removing redundant closures in the whole project

This commit is contained in:
Grzegorz
2019-02-10 13:35:44 +01:00
parent b38c587b98
commit 16881390e1
14 changed files with 24 additions and 19 deletions

View File

@@ -47,7 +47,7 @@ impl Lint {
name: name.to_lowercase(),
group: group.to_string(),
desc: NL_ESCAPE_RE.replace(&desc.replace("\\\"", "\""), "").to_string(),
deprecation: deprecation.map(|d| d.to_string()),
deprecation: deprecation.map(std::string::ToString::to_string),
module: module.to_string(),
}
}
@@ -178,7 +178,7 @@ fn lint_files() -> impl Iterator<Item = walkdir::DirEntry> {
// Otherwise we would not collect all the lints, for example in `clippy_lints/src/methods/`.
WalkDir::new("../clippy_lints/src")
.into_iter()
.filter_map(|f| f.ok())
.filter_map(std::result::Result::ok)
.filter(|f| f.path().extension() == Some(OsStr::new("rs")))
}