Skip to content

Commit f2f73f9

Browse files
committed
Replace .map(…).any(identity) by .any(…)
1 parent 625d391 commit f2f73f9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clippy_lints/src/casts/unnecessary_cast.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,7 @@ fn is_cast_from_ty_alias<'tcx>(cx: &LateContext<'tcx>, expr: impl Visitable<'tcx
268268
if !snippet
269269
.split("->")
270270
.skip(1)
271-
.map(|s| snippet_eq_ty(s, cast_from) || s.split("where").any(|ty| snippet_eq_ty(ty, cast_from)))
272-
.any(|a| a)
271+
.any(|s| snippet_eq_ty(s, cast_from) || s.split("where").any(|ty| snippet_eq_ty(ty, cast_from)))
273272
{
274273
return ControlFlow::Break(());
275274
}

0 commit comments

Comments
 (0)