We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 638c495 commit c8cb250Copy full SHA for c8cb250
tests/all.rs
@@ -55,14 +55,7 @@ impl<R: Read> Read for RandomReader<R> {
55
/// The RNG is seeded from a hash of the data, so different archives
56
/// exercise different read-size sequences while remaining deterministic.
57
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
- }
+ RandomReader::new(Cursor::new(data))
66
}
67
68
macro_rules! tar {
0 commit comments