diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-05-05 19:04:37 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-05-05 19:04:53 +0200 |
commit | 475c27e9664f546e9471d98f220edd6acd44d466 (patch) | |
tree | 0d6e516af6dc717a5ce07da251c0fad6f76d720b /components/layout/layout_debug.rs | |
parent | 49aed6555dbc008c1a378c5cbb303f5467232b6b (diff) | |
download | servo-475c27e9664f546e9471d98f220edd6acd44d466.tar.gz servo-475c27e9664f546e9471d98f220edd6acd44d466.zip |
Make DEBUG_ID_COUNTER a plain static.
Apparently it no longer needs to be static mut.
Diffstat (limited to 'components/layout/layout_debug.rs')
-rw-r--r-- | components/layout/layout_debug.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/components/layout/layout_debug.rs b/components/layout/layout_debug.rs index 36a013161dc..e9e5c585e68 100644 --- a/components/layout/layout_debug.rs +++ b/components/layout/layout_debug.rs @@ -6,7 +6,6 @@ //! that can be viewed by an external tool to make layout debugging easier. #![macro_use] -#![allow(unsafe_code)] // thread_local!() defines an unsafe function on Android use flow_ref::FlowRef; use flow; @@ -20,7 +19,7 @@ use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT}; thread_local!(static STATE_KEY: RefCell<Option<State>> = RefCell::new(None)); -static mut DEBUG_ID_COUNTER: AtomicUsize = ATOMIC_USIZE_INIT; +static DEBUG_ID_COUNTER: AtomicUsize = ATOMIC_USIZE_INIT; pub struct Scope; @@ -98,7 +97,7 @@ impl Drop for Scope { /// which are often reallocated but represent essentially the /// same data. pub fn generate_unique_debug_id() -> u16 { - unsafe { DEBUG_ID_COUNTER.fetch_add(1, Ordering::SeqCst) as u16 } + DEBUG_ID_COUNTER.fetch_add(1, Ordering::SeqCst) as u16 } /// Begin a layout debug trace. If this has not been called, |