Fix clippy lints added in 1.57 (#225)

This commit is contained in:
Danilo Bargen 2021-12-04 21:34:06 +01:00 committed by GitHub
commit 9c90f8ba7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

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

View file

@ -75,6 +75,7 @@ struct RawStyle {
pub italic: bool,
}
#[allow(clippy::derivable_impls)] // Explicitly control defaults
impl Default for RawStyle {
fn default() -> Self {
Self {