File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/tools/clippy/clippy_lints/src Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1590,9 +1590,9 @@ fn is_none_arm(cx: &LateContext<'_>, arm: &Arm<'_>) -> bool {
15901590// Checks if arm has the form `Some(ref v) => Some(v)` (checks for `ref` and `ref mut`)
15911591fn is_ref_some_arm ( cx : & LateContext < ' _ > , arm : & Arm < ' _ > ) -> Option < BindingAnnotation > {
15921592 if_chain ! {
1593- if let PatKind :: TupleStruct ( ref qpath, pats , _) = arm. pat. kind;
1593+ if let PatKind :: TupleStruct ( ref qpath, [ first_pat , .. ] , _) = arm. pat. kind;
15941594 if is_lang_ctor( cx, qpath, OptionSome ) ;
1595- if let PatKind :: Binding ( rb, .., ident, _) = pats [ 0 ] . kind;
1595+ if let PatKind :: Binding ( rb, .., ident, _) = first_pat . kind;
15961596 if rb == BindingAnnotation :: Ref || rb == BindingAnnotation :: RefMut ;
15971597 if let ExprKind :: Call ( e, args) = remove_blocks( arm. body) . kind;
15981598 if let ExprKind :: Path ( ref some_path) = e. kind;
You can’t perform that action at this time.
0 commit comments