mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Upgrade to new Hasher API
This commit is contained in:
parent
b1fffcd85d
commit
95be0b9a25
9 changed files with 14 additions and 20 deletions
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue