We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d58ba2 commit fcc56fcCopy full SHA for fcc56fc
clippy_lints/src/loops.rs
@@ -922,7 +922,7 @@ fn get_indexed_assignments<'a, 'tcx>(
922
.chain(expr.as_ref().into_iter().map(|e| Some(get_assignment(cx, &*e, var))))
923
.filter_map(|op| op)
924
.collect::<Option<Vec<_>>>()
925
- .unwrap_or_else(|| vec![])
+ .unwrap_or_default()
926
} else {
927
get_assignment(cx, body, var).into_iter().collect()
928
}
0 commit comments