Auto merge of #11295 - lengyijun:typo, r=Centri3

Small code style adjustments

changelog: none
This commit is contained in:
bors 2023-08-07 03:23:23 +00:00
commit 84d2896747

View file

@ -4020,11 +4020,9 @@ impl Methods {
}
},
("last", []) => {
if let Some((name2, recv2, args2, _span2, _)) = method_call(recv) {
if let ("cloned", []) = (name2, args2) {
if let Some(("cloned", recv2, [], _span2, _)) = method_call(recv) {
iter_overeager_cloned::check(cx, expr, recv, recv2, false, false);
}
}
},
("lock", []) => {
mut_mutex_lock::check(cx, expr, recv, span);
@ -4127,12 +4125,10 @@ impl Methods {
("skip", [arg]) => {
iter_skip_zero::check(cx, expr, arg);
if let Some((name2, recv2, args2, _span2, _)) = method_call(recv) {
if let ("cloned", []) = (name2, args2) {
if let Some(("cloned", recv2, [], _span2, _)) = method_call(recv) {
iter_overeager_cloned::check(cx, expr, recv, recv2, false, false);
}
}
}
("sort", []) => {
stable_sort_primitive::check(cx, expr, recv);
},
@ -4155,11 +4151,9 @@ impl Methods {
},
("step_by", [arg]) => iterator_step_by_zero::check(cx, expr, arg),
("take", [_arg]) => {
if let Some((name2, recv2, args2, _span2, _)) = method_call(recv) {
if let ("cloned", []) = (name2, args2) {
if let Some(("cloned", recv2, [], _span2, _)) = method_call(recv) {
iter_overeager_cloned::check(cx, expr, recv, recv2, false, false);
}
}
},
("take", []) => needless_option_take::check(cx, expr, recv),
("then", [arg]) => {