Move arc_ptr_eq to style.

This commit is contained in:
Ms2ger 2016-07-11 12:13:12 +02:00
parent 8ded106186
commit 9f13278b77
6 changed files with 17 additions and 17 deletions

View file

@ -103,6 +103,8 @@ pub mod values;
pub mod viewport;
pub mod workqueue;
use std::sync::Arc;
/// The CSS properties supported by the style system.
// Generated from the properties.mako.rs template by build.rs
#[macro_use]
@ -126,3 +128,11 @@ macro_rules! reexport_computed_values {
}
}
longhand_properties_idents!(reexport_computed_values);
/// Returns whether the two arguments point to the same value.
#[inline]
pub fn arc_ptr_eq<T: 'static>(a: &Arc<T>, b: &Arc<T>) -> bool {
let a: &T = &**a;
let b: &T = &**b;
(a as *const T) == (b as *const T)
}