Commit 702a83b 1 parent 2e2e45a commit 702a83b Copy full SHA for 702a83b
File tree 1 file changed +5
-8
lines changed
1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -287,15 +287,12 @@ impl<'a> VecArgs<'a> {
287
287
Some ( VecArgs :: Repeat ( & args[ 0 ] , & args[ 1 ] ) )
288
288
} else if match_def_path( cx, fun_def_id, & paths:: SLICE_INTO_VEC ) && args. len( ) == 1 {
289
289
// `vec![a, b, c]` case
290
- if_chain! {
291
- if let hir:: ExprKind :: Box ( boxed) = args[ 0 ] . kind;
292
- if let hir:: ExprKind :: Array ( args) = boxed. kind;
293
- then {
294
- return Some ( VecArgs :: Vec ( args) ) ;
295
- }
290
+ if let hir:: ExprKind :: Call ( _, [ arg] ) = & args[ 0 ] . kind
291
+ && let hir:: ExprKind :: Array ( args) = arg. kind {
292
+ Some ( VecArgs :: Vec ( args) )
293
+ } else {
294
+ None
296
295
}
297
-
298
- None
299
296
} else if match_def_path( cx, fun_def_id, & paths:: VEC_NEW ) && args. is_empty( ) {
300
297
Some ( VecArgs :: Vec ( & [ ] ) )
301
298
} else {
You can’t perform that action at this time.
0 commit comments