Skip to content

Commit c8cb250

Browse files
committed
tests: Squash a warning
Sorry I missed this one, some refactoring led to code duplication.
1 parent 638c495 commit c8cb250

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

tests/all.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,7 @@ impl<R: Read> Read for RandomReader<R> {
5555
/// The RNG is seeded from a hash of the data, so different archives
5656
/// exercise different read-size sequences while remaining deterministic.
5757
fn random_cursor_reader<D: AsRef<[u8]>>(data: D) -> RandomReader<Cursor<D>> {
58-
use std::hash::{Hash, Hasher};
59-
let mut hasher = std::collections::hash_map::DefaultHasher::new();
60-
data.as_ref().hash(&mut hasher);
61-
let seed = hasher.finish();
62-
RandomReader {
63-
inner: Cursor::new(data),
64-
rng: SmallRng::seed_from_u64(seed),
65-
}
58+
RandomReader::new(Cursor::new(data))
6659
}
6760

6861
macro_rules! tar {

0 commit comments

Comments
 (0)