mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #9523 - ruud-v-a:hasher, r=Wafflespeanut
Upgrade to new Hasher API This fixes #9494. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9523) <!-- Reviewable:end -->
This commit is contained in:
commit
87aaa5ffe0
9 changed files with 14 additions and 20 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#![feature(box_syntax)]
|
||||
#![feature(custom_attribute)]
|
||||
#![feature(custom_derive)]
|
||||
#![feature(hashmap_hasher)]
|
||||
#![feature(mpsc_select)]
|
||||
#![feature(plugin)]
|
||||
#![feature(str_char)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue