Skip to content
Snippets Groups Projects
Verified Commit b32bf428 authored by Vincent Lafeychine's avatar Vincent Lafeychine
Browse files

clippy: Fix bind_instead_of_map

parent 778373c7
No related branches found
No related tags found
1 merge request!33Fix most of clippy::complexity and clippy::correctness
......@@ -2,14 +2,14 @@
rustflags = [
# === ENABLE ALL LINTS ===
"-Dclippy::complexity",
"-Dclippy::correctness",
"-Dclippy::nursery",
"-Dclippy::pedantic",
"-Dclippy::perf",
"-Dclippy::restriction",
"-Dclippy::style",
"-Dclippy::suspicious",
"-Wclippy::complexity",
"-Wclippy::correctness",
"-Wclippy::nursery",
"-Wclippy::pedantic",
"-Wclippy::perf",
"-Wclippy::restriction",
"-Wclippy::style",
"-Wclippy::suspicious",
# === REASONABLE LINTS ===
......@@ -21,7 +21,6 @@ rustflags = [
"-Aunused_variables",
# clippy::complexity
"-Aclippy::bind_instead_of_map",
"-Aclippy::borrow_deref_ref",
"-Aclippy::clone_on_copy",
"-Aclippy::explicit_auto_deref",
......
......@@ -3787,7 +3787,7 @@ impl<'a, 'def: 'a, 'tcx: 'def> BodyTranslator<'a, 'def, 'tcx> {
.get_mir()
.local_decls
.get(*local)
.and_then(|decl| Some(decl.ty))
.map(|decl| decl.ty)
.ok_or(TranslationError::UnknownVar("".to_string()))
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment