diff --git a/src/components/main/css/matching.rs b/src/components/main/css/matching.rs index 2c3db7894a5..312deb89bd1 100644 --- a/src/components/main/css/matching.rs +++ b/src/components/main/css/matching.rs @@ -131,7 +131,7 @@ impl<'a> Hash for ApplicableDeclarationsCacheQuery<'a> { static APPLICABLE_DECLARATIONS_CACHE_SIZE: uint = 32; pub struct ApplicableDeclarationsCache { - pub cache: SimpleHashCache>, + cache: SimpleHashCache>, } impl ApplicableDeclarationsCache { @@ -149,7 +149,7 @@ impl ApplicableDeclarationsCache { } fn insert(&mut self, declarations: &[MatchedProperty], style: Arc) { - drop(self.cache.insert(ApplicableDeclarationsCacheEntry::new(declarations), style)) + self.cache.insert(ApplicableDeclarationsCacheEntry::new(declarations), style) } } diff --git a/src/components/util/cache.rs b/src/components/util/cache.rs index 043d0c2b0d7..768b015bc44 100644 --- a/src/components/util/cache.rs +++ b/src/components/util/cache.rs @@ -216,7 +216,7 @@ impl SimpleHashCache { impl Cache for SimpleHashCache { fn insert(&mut self, key: K, value: V) { let bucket_index = self.bucket_for_key(&key); - *self.entries.get_mut(bucket_index) = Some((key, value)) + *self.entries.get_mut(bucket_index) = Some((key, value)); } fn find(&mut self, key: &K) -> Option {