aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/gfx/font_context.rs7
-rw-r--r--components/gfx/lib.rs1
-rw-r--r--components/layout/context.rs4
-rw-r--r--components/layout/layout_thread.rs8
-rw-r--r--components/layout/lib.rs1
-rw-r--r--components/script/dom/eventtarget.rs4
-rw-r--r--components/script/lib.rs1
-rw-r--r--components/util/cache.rs7
-rw-r--r--components/util/lib.rs1
9 files changed, 14 insertions, 20 deletions
diff --git a/components/gfx/font_context.rs b/components/gfx/font_context.rs
index 6fc010fedf3..8262b0d15fb 100644
--- a/components/gfx/font_context.rs
+++ b/components/gfx/font_context.rs
@@ -20,9 +20,8 @@ use platform::font_template::FontTemplateData;
use smallvec::SmallVec;
use std::cell::RefCell;
use std::collections::HashMap;
-use std::collections::hash_state::DefaultState;
use std::default::Default;
-use std::hash::{Hash, Hasher};
+use std::hash::{BuildHasherDefault, Hash, Hasher};
use std::rc::Rc;
use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
@@ -86,7 +85,7 @@ pub struct FontContext {
paint_font_cache: Vec<PaintFontCacheEntry>,
layout_font_group_cache:
- HashMap<LayoutFontGroupCacheKey, Rc<FontGroup>, DefaultState<FnvHasher>>,
+ HashMap<LayoutFontGroupCacheKey, Rc<FontGroup>, BuildHasherDefault<FnvHasher>>,
epoch: usize,
}
@@ -100,7 +99,7 @@ impl FontContext {
layout_font_cache: vec!(),
fallback_font_cache: vec!(),
paint_font_cache: vec!(),
- layout_font_group_cache: HashMap::with_hash_state(Default::default()),
+ layout_font_group_cache: HashMap::with_hasher(Default::default()),
epoch: 0,
}
}
diff --git a/components/gfx/lib.rs b/components/gfx/lib.rs
index 8bc6f8c8b4a..1ce6fb64f1c 100644
--- a/components/gfx/lib.rs
+++ b/components/gfx/lib.rs
@@ -9,7 +9,6 @@
#![feature(box_syntax)]
#![feature(custom_attribute)]
#![feature(custom_derive)]
-#![feature(hashmap_hasher)]
#![feature(mpsc_select)]
#![feature(plugin)]
#![feature(str_char)]
diff --git a/components/layout/context.rs b/components/layout/context.rs
index 134a6f03b2b..7eb01a68846 100644
--- a/components/layout/context.rs
+++ b/components/layout/context.rs
@@ -21,7 +21,7 @@ use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheThread, ImageResp
use net_traits::image_cache_thread::{ImageOrMetadataAvailable, UsePlaceholder};
use std::cell::{RefCell, RefMut};
use std::collections::HashMap;
-use std::collections::hash_state::DefaultState;
+use std::hash::BuildHasherDefault;
use std::rc::Rc;
use std::sync::mpsc::Sender;
use std::sync::{Arc, Mutex};
@@ -96,7 +96,7 @@ pub struct SharedLayoutContext {
pub canvas_layers_sender: Mutex<Sender<(LayerId, IpcSender<CanvasMsg>)>>,
/// The visible rects for each layer, as reported to us by the compositor.
- pub visible_rects: Arc<HashMap<LayerId, Rect<Au>, DefaultState<FnvHasher>>>,
+ pub visible_rects: Arc<HashMap<LayerId, Rect<Au>, BuildHasherDefault<FnvHasher>>>,
}
pub struct LayoutContext<'a> {
diff --git a/components/layout/layout_thread.rs b/components/layout/layout_thread.rs
index 2b1950d88ce..8599b89cc2d 100644
--- a/components/layout/layout_thread.rs
+++ b/components/layout/layout_thread.rs
@@ -55,7 +55,7 @@ use serde_json;
use std::borrow::ToOwned;
use std::cell::RefCell;
use std::collections::HashMap;
-use std::collections::hash_state::DefaultState;
+use std::hash::BuildHasherDefault;
use std::ops::{Deref, DerefMut};
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::mpsc::{channel, Sender, Receiver};
@@ -195,7 +195,7 @@ pub struct LayoutThread {
/// The position and size of the visible rect for each layer. We do not build display lists
/// for any areas more than `DISPLAY_PORT_SIZE_FACTOR` screens away from this area.
- visible_rects: Arc<HashMap<LayerId, Rect<Au>, DefaultState<FnvHasher>>>,
+ visible_rects: Arc<HashMap<LayerId, Rect<Au>, BuildHasherDefault<FnvHasher>>>,
/// The list of currently-running animations.
running_animations: Arc<RwLock<HashMap<OpaqueNode, Vec<Animation>>>>,
@@ -430,7 +430,7 @@ impl LayoutThread {
new_animations_receiver: new_animations_receiver,
outstanding_web_fonts: outstanding_web_fonts_counter,
root_flow: None,
- visible_rects: Arc::new(HashMap::with_hash_state(Default::default())),
+ visible_rects: Arc::new(HashMap::with_hasher(Default::default())),
running_animations: Arc::new(RwLock::new(HashMap::new())),
expired_animations: Arc::new(RwLock::new(HashMap::new())),
epoch: Epoch(0),
@@ -1099,7 +1099,7 @@ impl LayoutThread {
// layers have moved more than `DISPLAY_PORT_THRESHOLD_SIZE_FACTOR` away from their last
// positions.
let mut must_regenerate_display_lists = false;
- let mut old_visible_rects = HashMap::with_hash_state(Default::default());
+ let mut old_visible_rects = HashMap::with_hasher(Default::default());
let inflation_amount =
Size2D::new(self.viewport_size.width * DISPLAY_PORT_THRESHOLD_SIZE_FACTOR,
self.viewport_size.height * DISPLAY_PORT_THRESHOLD_SIZE_FACTOR);
diff --git a/components/layout/lib.rs b/components/layout/lib.rs
index a3b78e8c4bd..85f70270148 100644
--- a/components/layout/lib.rs
+++ b/components/layout/lib.rs
@@ -6,7 +6,6 @@
#![feature(box_syntax)]
#![feature(cell_extras)]
#![feature(custom_derive)]
-#![feature(hashmap_hasher)]
#![feature(mpsc_select)]
#![feature(nonzero)]
#![feature(plugin)]
diff --git a/components/script/dom/eventtarget.rs b/components/script/dom/eventtarget.rs
index 2cf9517d606..91afac1bf1c 100644
--- a/components/script/dom/eventtarget.rs
+++ b/components/script/dom/eventtarget.rs
@@ -29,9 +29,9 @@ use js::rust::{AutoObjectVectorWrapper, CompileOptionsWrapper};
use libc::{c_char, size_t};
use std::collections::HashMap;
use std::collections::hash_map::Entry::{Occupied, Vacant};
-use std::collections::hash_state::DefaultState;
use std::default::Default;
use std::ffi::CString;
+use std::hash::BuildHasherDefault;
use std::rc::Rc;
use std::{intrinsics, ptr};
use string_cache::Atom;
@@ -161,7 +161,7 @@ pub struct EventListenerEntry {
#[dom_struct]
pub struct EventTarget {
reflector_: Reflector,
- handlers: DOMRefCell<HashMap<Atom, Vec<EventListenerEntry>, DefaultState<FnvHasher>>>,
+ handlers: DOMRefCell<HashMap<Atom, Vec<EventListenerEntry>, BuildHasherDefault<FnvHasher>>>,
}
impl EventTarget {
diff --git a/components/script/lib.rs b/components/script/lib.rs
index b857a00e122..dfd11938075 100644
--- a/components/script/lib.rs
+++ b/components/script/lib.rs
@@ -12,7 +12,6 @@
#![feature(custom_attribute)]
#![feature(custom_derive)]
#![feature(fnbox)]
-#![feature(hashmap_hasher)]
#![feature(mpsc_select)]
#![feature(nonzero)]
#![feature(on_unimplemented)]
diff --git a/components/util/cache.rs b/components/util/cache.rs
index deb87405d1f..7b8d7bfb1a0 100644
--- a/components/util/cache.rs
+++ b/components/util/cache.rs
@@ -6,9 +6,8 @@ use rand;
use rand::Rng;
use std::collections::HashMap;
use std::collections::hash_map::Entry::{Occupied, Vacant};
-use std::collections::hash_state::DefaultState;
use std::default::Default;
-use std::hash::{Hash, Hasher, SipHasher};
+use std::hash::{BuildHasherDefault, Hash, Hasher, SipHasher};
use std::slice::Iter;
@@ -17,7 +16,7 @@ pub struct HashCache<K, V>
where K: Clone + PartialEq + Eq + Hash,
V: Clone,
{
- entries: HashMap<K, V, DefaultState<SipHasher>>,
+ entries: HashMap<K, V, BuildHasherDefault<SipHasher>>,
}
impl<K, V> HashCache<K, V>
@@ -26,7 +25,7 @@ impl<K, V> HashCache<K, V>
{
pub fn new() -> HashCache<K, V> {
HashCache {
- entries: HashMap::with_hash_state(<DefaultState<SipHasher> as Default>::default()),
+ entries: HashMap::with_hasher(Default::default()),
}
}
diff --git a/components/util/lib.rs b/components/util/lib.rs
index 61d99cb5a02..34e8883d02b 100644
--- a/components/util/lib.rs
+++ b/components/util/lib.rs
@@ -8,7 +8,6 @@
#![feature(custom_derive)]
#![cfg_attr(feature = "non-geckolib", feature(decode_utf16))]
#![feature(fnbox)]
-#![feature(hashmap_hasher)]
#![feature(heap_api)]
#![feature(oom)]
#![feature(optin_builtin_traits)]