From 8817fc7efa0c2d7e63d9e3a045ff1f97b0c6fc71 Mon Sep 17 00:00:00 2001 From: Vinzent Steinberg Date: Mon, 3 Sep 2018 19:02:51 +0200 Subject: [PATCH] Fix a few clippy warnings --- coreopts.rs | 2 +- encoding.rs | 4 ++-- fs.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/coreopts.rs b/coreopts.rs index 5851854..c245cf5 100644 --- a/coreopts.rs +++ b/coreopts.rs @@ -18,7 +18,7 @@ impl<'a> CoreOptions<'a> { pub fn new(help_text: HelpText<'a>) -> Self { let mut ret = CoreOptions { options: getopts::Options::new(), - help_text: help_text, + help_text, }; ret.options .optflag("", "help", "print usage information") diff --git a/encoding.rs b/encoding.rs index 0bc8d5b..ca0e2ee 100644 --- a/encoding.rs +++ b/encoding.rs @@ -66,8 +66,8 @@ impl Data { Data { line_wrap: 76, ignore_garbage: false, - input: input, - format: format, + input, + format, alphabet: match format { Base32 => b"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=", Base64 => b"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789=+/", diff --git a/fs.rs b/fs.rs index 78ccfbe..39a7c47 100644 --- a/fs.rs +++ b/fs.rs @@ -31,7 +31,7 @@ macro_rules! has { ) } -pub fn resolve_relative_path<'a>(path: &'a Path) -> Cow<'a, Path> { +pub fn resolve_relative_path(path: &Path) -> Cow { if path.components().all(|e| e != Component::ParentDir) { return path.into(); }