]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_middle/src/mir/terminator.rs
Rollup merge of #76858 - rcvalle:rust-lang-exploit-mitigations, r=steveklabnik
[rust.git] / compiler / rustc_middle / src / mir / terminator.rs
index c9493c679879eebf1d74d5f9f025d38314f0aefa..709ffc3049ab81fb8d0e500f096cc521f2656e44 100644 (file)
@@ -46,7 +46,7 @@ impl SwitchTargets {
     pub fn new(targets: impl Iterator<Item = (u128, BasicBlock)>, otherwise: BasicBlock) -> Self {
         let (values, mut targets): (SmallVec<_>, SmallVec<_>) = targets.unzip();
         targets.push(otherwise);
-        Self { values: values.into(), targets }
+        Self { values, targets }
     }
 
     /// Builds a switch targets definition that jumps to `then` if the tested value equals `value`,