Replace .map(…).any(identity) by .any(…)

This commit is contained in:
Samuel Tardieu 2024-10-05 01:05:24 +02:00
parent 625d391107
commit f2f73f9c9c

View File

@ -268,8 +268,7 @@ fn is_cast_from_ty_alias<'tcx>(cx: &LateContext<'tcx>, expr: impl Visitable<'tcx
if !snippet
.split("->")
.skip(1)
.map(|s| snippet_eq_ty(s, cast_from) || s.split("where").any(|ty| snippet_eq_ty(ty, cast_from)))
.any(|a| a)
.any(|s| snippet_eq_ty(s, cast_from) || s.split("where").any(|ty| snippet_eq_ty(ty, cast_from)))
{
return ControlFlow::Break(());
}