Skip to content

Commit 0e04153

Browse files
Remove uneccessary, leftover comments in lint_iter_mut()
1 parent cfa0c57 commit 0e04153

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

clippy_lints/src/methods.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,17 +649,14 @@ fn lint_cstring_as_ptr(cx: &LateContext, expr: &hir::Expr, new: &hir::Expr, unwr
649649
#[allow(ptr_arg)]
650650
// Type of MethodArgs is potentially a Vec
651651
fn lint_iter_nth(cx: &LateContext, expr: &hir::Expr, iter_args: &MethodArgs, is_mut: bool){
652-
// lint if the caller of `.iter().nth()` is a `slice`
653652
let caller_type;
654653
let mut_str = if is_mut { "_mut" } else {""};
655654
if let Some(_) = derefs_to_slice(cx, &iter_args[0], &cx.tcx.expr_ty(&iter_args[0])) {
656655
caller_type = "slice";
657656
}
658-
// lint if the caller of `.iter().nth()` is a `Vec`
659657
else if match_type(cx, cx.tcx.expr_ty(&iter_args[0]), &paths::VEC) {
660658
caller_type = "Vec";
661659
}
662-
// lint if the caller of `.iter().nth()` is a `VecDeque`
663660
else if match_type(cx, cx.tcx.expr_ty(&iter_args[0]), &paths::VEC_DEQUE) {
664661
caller_type = "VecDeque";
665662
}

0 commit comments

Comments
 (0)