mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Move arc_ptr_eq to style.
This commit is contained in:
parent
8ded106186
commit
9f13278b77
6 changed files with 17 additions and 17 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue