Skip to content

Commit 177d90d

Browse files
committed
clean and move u64 to f64 rng
1 parent 6f97936 commit 177d90d

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

crates/binjs_io/src/bytes/compress.rs

-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ impl Distribution<Compression> for Standard {
4242
choices.choose(rng)
4343
.unwrap()
4444
.clone()
45-
// rng.choose(&[Identity, Gzip, /* Deflate is apprently broken https://github.com/alexcrichton/flate2-rs/issues/151 , */ Brotli /*, Lzw doesn't work yet */])
46-
// .unwrap()
47-
// .clone()
4845
}
4946
}
5047

tests/test_roundtrip.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ fn progress() {
3737
/// Skipping is generally needed to avoid timeouts, because we
3838
/// are testing lots of files.
3939
fn should_skip(rng: &mut RngCore) -> bool {
40-
let float = rng.next_u64();
41-
float < CHANCES_TO_SKIP as u64
40+
let float = rng.next::<f64>();
41+
float < CHANCES_TO_SKIP
4242
}
4343

4444
/// A visitor designed to reset offsets to 0.

0 commit comments

Comments
 (0)