diff options
author | Corey Farwell <coreyf@rwell.org> | 2016-07-02 13:51:17 -0400 |
---|---|---|
committer | Corey Farwell <coreyf@rwell.org> | 2016-07-02 16:43:39 -0400 |
commit | 22928f50ace78091bcb434c61e731663dbf3e625 (patch) | |
tree | e94536bc35887e3f4a7c9e5dd5f7dc2d271b415f /components/script/timers.rs | |
parent | 307844a8c17aedc369388baf4d98b0f82c3b695b (diff) | |
download | servo-22928f50ace78091bcb434c61e731663dbf3e625.tar.gz servo-22928f50ace78091bcb434c61e731663dbf3e625.zip |
Refactor `util::prefs` operations to be methods on static struct.
Diffstat (limited to 'components/script/timers.rs')
-rw-r--r-- | components/script/timers.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/timers.rs b/components/script/timers.rs index 989382e80fe..237c354be9f 100644 --- a/components/script/timers.rs +++ b/components/script/timers.rs @@ -22,7 +22,7 @@ use std::cmp::{self, Ord, Ordering}; use std::collections::HashMap; use std::default::Default; use std::rc::Rc; -use util::prefs::get_pref; +use util::prefs::PREFS; #[derive(JSTraceable, PartialEq, Eq, Copy, Clone, HeapSizeOf, Hash, PartialOrd, Ord, Debug)] pub struct OneshotTimerHandle(i32); @@ -214,7 +214,7 @@ impl OneshotTimers { } pub fn slow_down(&self) { - let duration = get_pref("js.timers.minimum_duration").as_u64().unwrap_or(1000); + let duration = PREFS.get("js.timers.minimum_duration").as_u64().unwrap_or(1000); self.js_timers.set_min_duration(MsDuration::new(duration)); } |