Skip to content

Commit 22d3669

Browse files
committedFeb 22, 2014
auto merge of #11863 : erickt/rust/hash, r=acrichto
This PR merges `IterBytes` and `Hash` into a trait that allows for generic non-stream-based hashing. It makes use of @eddyb's default type parameter support in order to have a similar usage to the old `Hash` framework. Fixes #8038. Todo: - [x] Better documentation - [ ] Benchmark - [ ] Parameterize `HashMap` on a `Hasher`.
2 parents 2ba0a8a + ca6d512 commit 22d3669

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1191
-17
lines changed
 

‎src/etc/generate-deriving-span-tests.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def write_file(name, string):
119119
('Clone', [], 1), ('DeepClone', ['Clone'], 1),
120120
('Eq', [], 2), ('Ord', [], 8),
121121
('TotalEq', [], 1), ('TotalOrd', ['TotalEq'], 1),
122-
('Show', [], 1)]:
122+
('Show', [], 1),
123+
('Hash', [], 1)]:
123124
traits[trait] = (ALL, supers, errs)
124125

125126
for (trait, (types, super_traits, error_count)) in traits.items():

‎src/libextra/stats.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#[allow(missing_doc)];
1212

1313
use std::cmp;
14+
use std::hash_old::Hash;
1415
use std::hashmap;
1516
use std::io;
1617
use std::mem;

0 commit comments

Comments
 (0)