From 9c90f8ba7a73fe791d502dbe05f37a73234dafd6 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Sat, 4 Dec 2021 21:34:06 +0100 Subject: [PATCH] Fix clippy lints added in 1.57 (#225) --- src/cache.rs | 2 +- src/config.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cache.rs b/src/cache.rs index df7d362..a4a2100 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -312,7 +312,7 @@ impl Cache { let extension = &path.extension().and_then(OsStr::to_str).unwrap_or(""); if e.file_type().is_file() && extension == &"md" { path.file_stem() - .and_then(|stem| stem.to_str().map(|s| s.into())) + .and_then(|stem| stem.to_str().map(Into::into)) } else { None } diff --git a/src/config.rs b/src/config.rs index 2f5f62f..efd7feb 100644 --- a/src/config.rs +++ b/src/config.rs @@ -75,6 +75,7 @@ struct RawStyle { pub italic: bool, } +#[allow(clippy::derivable_impls)] // Explicitly control defaults impl Default for RawStyle { fn default() -> Self { Self {