diff --git a/components/style/selector_map.rs b/components/style/selector_map.rs index d4775f315ab..193196c488a 100644 --- a/components/style/selector_map.rs +++ b/components/style/selector_map.rs @@ -25,12 +25,12 @@ use stylist::Rule; /// A hasher implementation that doesn't hash anything, because it expects its /// input to be a suitable u32 hash. pub struct PrecomputedHasher { - hash: u32, + hash: Option, } impl Default for PrecomputedHasher { fn default() -> Self { - Self { hash: 0 } + Self { hash: None } } } @@ -43,17 +43,19 @@ pub type PrecomputedHashSet = HashSet u64 { - self.hash as u64 + self.hash.expect("PrecomputedHasher wasn't fed?") as u64 } }