[No-auto] lib/entry/view: Fix Clippy warnings

Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
flip1995 2019-08-27 10:28:52 +02:00 committed by Matthias Beyer
parent d377a999cb
commit a8bb180a6a
2 changed files with 3 additions and 3 deletions

View file

@ -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)

View file

@ -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)?;
}