@@ -6,7 +6,7 @@ use crate::rustc_data_structures::fx::FxHashMap;
6
6
use std:: collections:: hash_map:: Entry ;
7
7
use std:: hash:: BuildHasherDefault ;
8
8
use crate :: syntax:: symbol:: LocalInternedString ;
9
- use crate :: rustc_data_structures :: small_vec :: OneVector ;
9
+ use smallvec :: SmallVec ;
10
10
use crate :: utils:: { SpanlessEq , SpanlessHash } ;
11
11
use crate :: utils:: { get_parent_expr, in_macro, snippet, span_lint_and_then, span_note_and_lint} ;
12
12
@@ -235,9 +235,9 @@ fn lint_match_arms(cx: &LateContext<'_, '_>, expr: &Expr) {
235
235
/// sequence of `if/else`.
236
236
/// Eg. would return `([a, b], [c, d, e])` for the expression
237
237
/// `if a { c } else if b { d } else { e }`.
238
- fn if_sequence ( mut expr : & Expr ) -> ( OneVector < & Expr > , OneVector < & Block > ) {
239
- let mut conds = OneVector :: new ( ) ;
240
- let mut blocks: OneVector < & Block > = OneVector :: new ( ) ;
238
+ fn if_sequence ( mut expr : & Expr ) -> ( SmallVec < [ & Expr ; 1 ] > , SmallVec < [ & Block ; 1 ] > ) {
239
+ let mut conds = SmallVec :: new ( ) ;
240
+ let mut blocks: SmallVec < [ & Block ; 1 ] > = SmallVec :: new ( ) ;
241
241
242
242
while let ExprKind :: If ( ref cond, ref then_expr, ref else_expr) = expr. node {
243
243
conds. push ( & * * cond) ;
0 commit comments