aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/gecko_string_cache/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/style/gecko_string_cache/mod.rs')
-rw-r--r--components/style/gecko_string_cache/mod.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/components/style/gecko_string_cache/mod.rs b/components/style/gecko_string_cache/mod.rs
index b6659c6ab91..b10fd58174a 100644
--- a/components/style/gecko_string_cache/mod.rs
+++ b/components/style/gecko_string_cache/mod.rs
@@ -10,6 +10,7 @@ use gecko_bindings::bindings::Gecko_AddRefAtom;
use gecko_bindings::bindings::Gecko_Atomize;
use gecko_bindings::bindings::Gecko_ReleaseAtom;
use gecko_bindings::structs::nsIAtom;
+use precomputed_hash::PrecomputedHash;
use std::borrow::{Cow, Borrow};
use std::char::{self, DecodeUtf16};
use std::fmt::{self, Write};
@@ -56,6 +57,13 @@ impl Deref for Atom {
}
}
+impl PrecomputedHash for Atom {
+ #[inline]
+ fn precomputed_hash(&self) -> u32 {
+ self.get_hash()
+ }
+}
+
impl Borrow<WeakAtom> for Atom {
#[inline]
fn borrow(&self) -> &WeakAtom {