Skip to content

Commit

Permalink
move variable down to where it is used
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Apr 19, 2019
1 parent 29eed6b commit 2bc8c54
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/liballoc/collections/vec_deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
Expand Down

0 comments on commit 2bc8c54

Please sign in to comment.