File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Unreleased
22
3+ - ` StableHasher::finish ` now returns a small hash instead of being fatal (#6 )
34- Remove ` StableHasher::finalize ` (#4 )
45- 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 {
9797}
9898
9999impl Hasher for StableHasher {
100- /// <div class="warning">
100+ /// Returns a combined hash.
101101 ///
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`].
108103 fn finish ( & self ) -> u64 {
109- panic ! ( "use StableHasher::finalize instead" ) ;
104+ self . state . finish ( )
110105 }
111106
112107 #[ inline]
You can’t perform that action at this time.
0 commit comments