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

clippy: Fix manual_find

parent 1c340e52
No related branches found
No related tags found
1 merge request!33Fix most of clippy::complexity and clippy::correctness
......@@ -21,7 +21,6 @@ rustflags = [
"-Aunused_variables",
# clippy::complexity
"-Aclippy::manual_find",
"-Aclippy::manual_flatten",
"-Aclippy::match_single_binding",
"-Aclippy::needless_borrowed_reference",
......
......@@ -1223,12 +1223,7 @@ impl Display for UnionRepr {
/// Lookup a Rust-level type parameter identifier `name` in the given type parameter environment.
pub fn lookup_ty_param<'a, 'b>(name: &'a str, env: &'b [LiteralTyParam]) -> Option<&'b LiteralTyParam> {
for names in env.iter() {
if names.rust_name == name {
return Some(names);
}
}
None
env.iter().find(|&names| names.rust_name == name)
}
pub type AbstractVariantRef<'def> = &'def RefCell<Option<AbstractVariant<'def>>>;
......
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