Skip to content

Commit b24b2b9

Browse files
author
bors-servo
authored
Auto merge of #193 - servo:Hasher, r=SimonSapin
atom: Use the same hash everywhere. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/string-cache/193) <!-- Reviewable:end -->
2 parents 88d65e7 + e468085 commit b24b2b9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "string_cache"
4-
version = "0.6.1" # Also update README.md when making a semver-breaking change
4+
version = "0.6.2" # Also update README.md when making a semver-breaking change
55
authors = [ "The Servo Project Developers" ]
66
description = "A string interning library for Rust, developed as part of the Servo project."
77
license = "MIT / Apache-2.0"

src/atom.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ impl<Static: StaticAtomSet> Default for Atom<Static> {
268268
impl<Static: StaticAtomSet> Hash for Atom<Static> {
269269
#[inline]
270270
fn hash<H>(&self, state: &mut H) where H: Hasher {
271-
self.unsafe_data.hash(state)
271+
state.write_u32(self.get_hash())
272272
}
273273
}
274274

0 commit comments

Comments
 (0)