File tree 2 files changed +4
-8
lines changed
2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 1
1
# Unreleased
2
2
3
+ - ` StableHasher::finish ` now returns a small hash instead of being fatal (#6 )
3
4
- Remove ` StableHasher::finalize ` (#4 )
4
5
- Import stable hasher implementation from rustc ([ db8aca48129] ( https://github.com/rust-lang/rust/blob/db8aca48129d86b2623e3ac8cbcf2902d4d313ad/compiler/rustc_data_structures/src/ ) )
Original file line number Diff line number Diff line change @@ -97,16 +97,11 @@ impl fmt::Debug for StableHasher {
97
97
}
98
98
99
99
impl Hasher for StableHasher {
100
- /// <div class="warning">
100
+ /// Returns a combined hash.
101
101
///
102
- /// Do not use this function, it will unconditionnaly panic.
103
- ///
104
- /// Use instead [`StableHasher::finish`] which returns a
105
- /// `[u64; 2]` for greater precision.
106
- ///
107
- /// </div>
102
+ /// For greater precision use instead [`StableHasher::finish`].
108
103
fn finish ( & self ) -> u64 {
109
- panic ! ( "use StableHasher::finalize instead" ) ;
104
+ self . state . finish ( )
110
105
}
111
106
112
107
#[ inline]
You can’t perform that action at this time.
0 commit comments