diff --git a/lib/entry/libimagentryview/src/builtin/md.rs b/lib/entry/libimagentryview/src/builtin/md.rs index 839ba60d..53e98775 100644 --- a/lib/entry/libimagentryview/src/builtin/md.rs +++ b/lib/entry/libimagentryview/src/builtin/md.rs @@ -59,10 +59,10 @@ impl<'a> Viewer for MarkdownViewer<'a> { ::mdcat::push_tty(sink, TerminalCapabilities::ansi(), - self.termsize.clone(), + self.termsize, parser, base_dir, - self.resource_access.clone(), + self.resource_access, syntax_set) .map_err(|e| e.compat()) .map_err(::failure::Error::from) diff --git a/lib/entry/libimagentryview/src/builtin/stdout.rs b/lib/entry/libimagentryview/src/builtin/stdout.rs index 2706ca4a..6df89abe 100644 --- a/lib/entry/libimagentryview/src/builtin/stdout.rs +++ b/lib/entry/libimagentryview/src/builtin/stdout.rs @@ -60,7 +60,7 @@ impl Viewer for StdoutViewer { where W: Write { if self.view_header { - let header = to_string(e.get_header()).unwrap_or(String::from("TOML Parser error")); + let header = to_string(e.get_header()).unwrap_or_else(|_| String::from("TOML Parser error")); writeln!(sink, "{}", header)?; }