Skip to content
Permalink
Browse files

move variable down to where it is used

  • Loading branch information...
RalfJung committed Apr 19, 2019
1 parent 29eed6b commit 2bc8c547cdd9cd2e4f338477eea5860861879565
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/liballoc/collections/vec_deque.rs
@@ -3094,11 +3094,6 @@ mod tests {
fn test_vec_from_vecdeque() {
use crate::vec::Vec;

#[cfg(not(miri))] // Miri is too slow
let max_pwr = 7;
#[cfg(miri)]
let max_pwr = 5;

fn create_vec_and_test_convert(cap: usize, offset: usize, len: usize) {
let mut vd = VecDeque::with_capacity(cap);
for _ in 0..offset {
@@ -3112,6 +3107,11 @@ mod tests {
assert!(vec.into_iter().eq(vd));
}

#[cfg(not(miri))] // Miri is too slow
let max_pwr = 7;
#[cfg(miri)]
let max_pwr = 5;

for cap_pwr in 0..max_pwr {
// Make capacity as a (2^x)-1, so that the ring size is 2^x
let cap = (2i32.pow(cap_pwr) - 1) as usize;

0 comments on commit 2bc8c54

Please sign in to comment.
You can’t perform that action at this time.