summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflip1995 <hello@philkrones.com>2019-08-27 10:28:52 +0200
committerMatthias Beyer <mail@beyermatthias.de>2019-08-28 18:18:41 +0200
commita8bb180a6a20b7b1dda7682b3fb5857e230ccb4c (patch)
tree4e3cd342011385ba2d9e733492db04bfa4ffb5a9
parentd377a999cb4e0b81685376bcf73f4270f7c7dd3e (diff)
downloadimag-a8bb180a6a20b7b1dda7682b3fb5857e230ccb4c.zip
imag-a8bb180a6a20b7b1dda7682b3fb5857e230ccb4c.tar.gz
[No-auto] lib/entry/view: Fix Clippy warnings
Signed-off-by: flip1995 <hello@philkrones.com> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--lib/entry/libimagentryview/src/builtin/md.rs4
-rw-r--r--lib/entry/libimagentryview/src/builtin/stdout.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/entry/libimagentryview/src/builtin/md.rs b/lib/entry/libimagentryview/src/builtin/md.rs
index 839ba60..53e9877 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 2706ca4..6df89ab 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)?;
}