Merge commit '27afd6ade4bb1123a8bf82001629b69d23d62aff' into clippyup
This commit is contained in:
@@ -24,9 +24,9 @@ pub(super) fn derefs_to_slice<'tcx>(
|
||||
}
|
||||
}
|
||||
|
||||
if let hir::ExprKind::MethodCall(path, _, args, _) = expr.kind {
|
||||
if path.ident.name == sym::iter && may_slice(cx, cx.typeck_results().expr_ty(&args[0])) {
|
||||
Some(&args[0])
|
||||
if let hir::ExprKind::MethodCall(path, _, [self_arg, ..], _) = &expr.kind {
|
||||
if path.ident.name == sym::iter && may_slice(cx, cx.typeck_results().expr_ty(self_arg)) {
|
||||
Some(self_arg)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user