diff options
| author | Stjepan Glavina <stjepang@gmail.com> | 2017-06-26 11:20:31 +0200 |
|---|---|---|
| committer | Stjepan Glavina <stjepang@gmail.com> | 2017-06-26 11:20:31 +0200 |
| commit | 723833f4e1ab867e9dafc7fed863321d96d507e8 (patch) | |
| tree | 8daefaf2e058d9dae3e4194164c1453dbcfda9c5 | |
| parent | 12205f1450f390f10602a19a4e40b6d8f26857e4 (diff) | |
| download | rust-723833f4e1ab867e9dafc7fed863321d96d507e8.tar.gz rust-723833f4e1ab867e9dafc7fed863321d96d507e8.zip | |
Move thread_rng() outside the loop
| -rw-r--r-- | src/test/run-pass/vector-sort-panic-safe.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/run-pass/vector-sort-panic-safe.rs b/src/test/run-pass/vector-sort-panic-safe.rs index 3458199bdaf..4387a43f03b 100644 --- a/src/test/run-pass/vector-sort-panic-safe.rs +++ b/src/test/run-pass/vector-sort-panic-safe.rs @@ -141,10 +141,11 @@ fn main() { } })); + let mut rng = thread_rng(); + for len in (1..20).chain(70..MAX_LEN) { for &modulus in &[5, 20, 50] { for &has_runs in &[false, true] { - let mut rng = thread_rng(); let mut input = (0..len) .map(|id| { DropCounter { |
