Skip to content

Commit a9f7393

Browse files
committed
correct comments
1 parent 48dcb4b commit a9f7393

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/useless_conversion.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ impl<'tcx> LateLintPass<'tcx> for UselessConversion {
300300
if same_type_and_consts(a, b) && !is_copy(cx, b) {
301301
// Below we check if the parent method call meets the following conditions:
302302
// 1. First parameter is `&mut self` (requires mutable reference)
303-
// 2. Second parameter implements the `FnMut` trait (e.g., Iterator::for_each)
304-
// For methods satisfying these conditions (like for_each), .into_iter() must be preserved.
303+
// 2. Second parameter implements the `FnMut` trait (e.g., Iterator::any)
304+
// For methods satisfying these conditions (like any), .into_iter() must be preserved.
305305
if let Some(parent) = get_parent_expr(cx, e)
306306
&& let ExprKind::MethodCall(_, recv, _, _) = parent.kind
307307
&& recv.hir_id == e.hir_id

0 commit comments

Comments
 (0)