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

clippy: Fix never_loop

parent 8f2430a3
No related branches found
No related tags found
1 merge request!33Fix most of clippy::complexity and clippy::correctness
......@@ -27,7 +27,6 @@ rustflags = [
"-Aclippy::useless_format",
# clippy::correctness
"-Aclippy::never_loop",
"-Aclippy::option_env_unwrap",
"-Aclippy::redundant_locals",
"-Aclippy::unused_io_amount",
......
......@@ -2068,10 +2068,9 @@ impl<'a, 'def: 'a, 'tcx: 'def> BodyTranslator<'a, 'def, 'tcx> {
panic!("unconstrained lifetime");
} else if rs.len() == 1 {
// this is really just an equality constraint
for r2 in rs.iter() {
if let Some(r2) = rs.iter().next() {
let lft2 = self.format_region(*r2);
stmt_annots.push(radium::Annotation::CopyLftName(lft2, lft));
break;
}
} else {
// a proper intersection
......
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