diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-08-11 17:27:05 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-08-12 14:55:17 -0700 |
| commit | 8d90d3f36871a00023cc1f313f91e351c287ca15 (patch) | |
| tree | 2d9b616a2468117aa3afe1f6b1f910ff3116776b /src/libcoretest/hash | |
| parent | d07d465cf60033e35eba16b9e431471d54c712f4 (diff) | |
| download | rust-8d90d3f36871a00023cc1f313f91e351c287ca15.tar.gz rust-8d90d3f36871a00023cc1f313f91e351c287ca15.zip | |
Remove all unstable deprecated functionality
This commit removes all unstable and deprecated functions in the standard library. A release was recently cut (1.3) which makes this a good time for some spring cleaning of the deprecated functions.
Diffstat (limited to 'src/libcoretest/hash')
| -rw-r--r-- | src/libcoretest/hash/mod.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libcoretest/hash/mod.rs b/src/libcoretest/hash/mod.rs index 595bce68201..4ea42644ecd 100644 --- a/src/libcoretest/hash/mod.rs +++ b/src/libcoretest/hash/mod.rs @@ -36,7 +36,9 @@ impl Hasher for MyHasher { #[test] fn test_writer_hasher() { fn hash<T: Hash>(t: &T) -> u64 { - ::std::hash::hash::<_, MyHasher>(t) + let mut s = MyHasher { hash: 0 }; + t.hash(&mut s); + s.finish() } assert_eq!(hash(&()), 0); @@ -102,7 +104,9 @@ impl Hash for Custom { #[test] fn test_custom_state() { fn hash<T: Hash>(t: &T) -> u64 { - ::std::hash::hash::<_, CustomHasher>(t) + let mut c = CustomHasher { output: 0 }; + t.hash(&mut c); + c.finish() } assert_eq!(hash(&Custom { hash: 5 }), 5); |
