diff --git a/src/compiler/rust/smallvec.rs b/src/compiler/rust/smallvec.rs index afeecce004c..97537ee7fa4 100644 --- a/src/compiler/rust/smallvec.rs +++ b/src/compiler/rust/smallvec.rs @@ -161,6 +161,16 @@ impl FromIterator for SmallVec { } } +impl From> for Vec { + fn from(sv: SmallVec) -> Vec { + match sv { + SmallVec::None => Vec::new(), + SmallVec::One(i) => vec![i], + SmallVec::Many(v) => v, + } + } +} + enum IntoIterImpl { None, One(T),