Skip to content

Commit 9bcef5d

Browse files
committed
Update comments based on feedback
1 parent 9d9e5fa commit 9bcef5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/methods/iter_overeager_cloned.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ use rustc_span::sym;
99
use super::ITER_OVEREAGER_CLONED;
1010
use crate::redundant_clone::REDUNDANT_CLONE;
1111

12-
/// lint use of `cloned().<func>()` for `Iterators`
12+
/// lint overeager use of `cloned()` for `Iterator`s
1313
pub(super) fn check<'tcx>(
1414
cx: &LateContext<'tcx>,
1515
expr: &'tcx hir::Expr<'_>,
1616
recv: &'tcx hir::Expr<'_>,
1717
name: &str,
1818
map_arg: &[hir::Expr<'_>],
1919
) {
20-
// lint if caller of `.cloned().<func>()` is an Iterator
20+
// lint if callee is an Iterator
2121
let recv_impls_iterator = cx.tcx.get_diagnostic_item(sym::Iterator).map_or(false, |id| {
2222
implements_trait(cx, cx.typeck_results().expr_ty(recv), id, &[])
2323
});

0 commit comments

Comments
 (0)