Upgrade to new Hasher API

This commit is contained in:
Ruud van Asseldonk 2016-02-03 20:06:39 +01:00
parent b1fffcd85d
commit 95be0b9a25
9 changed files with 14 additions and 20 deletions

View file

@ -19,9 +19,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,
}
}

View file

@ -10,7 +10,6 @@
#![feature(box_syntax)]
#![feature(custom_attribute)]
#![feature(custom_derive)]
#![feature(hashmap_hasher)]
#![feature(mpsc_select)]
#![feature(plugin)]
#![feature(str_char)]