diff options
author | Bobby Holley <bobbyholley@gmail.com> | 2017-05-02 16:22:10 -0700 |
---|---|---|
committer | Bobby Holley <bobbyholley@gmail.com> | 2017-05-02 17:35:45 -0700 |
commit | 7b0679848b177ead3a87171d0224e05ecadd8006 (patch) | |
tree | 69ecc07d8293ca15f04dd066da132cad31414161 /components/layout/lib.rs | |
parent | d78ca4c4f9f1866204cbb420b284be1cbc137712 (diff) | |
download | servo-7b0679848b177ead3a87171d0224e05ecadd8006.tar.gz servo-7b0679848b177ead3a87171d0224e05ecadd8006.zip |
Fix up script and layout.
Diffstat (limited to 'components/layout/lib.rs')
-rw-r--r-- | components/layout/lib.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/components/layout/lib.rs b/components/layout/lib.rs index 4c5bd766e24..dd86ba46cde 100644 --- a/components/layout/lib.rs +++ b/components/layout/lib.rs @@ -93,3 +93,15 @@ pub mod wrapper; // For unit tests: pub use fragment::Fragment; pub use fragment::SpecificFragmentInfo; + +/// Returns whether the two arguments point to the same value. +/// +/// FIXME: Remove this and use Arc::ptr_eq once we require Rust 1.17 +#[inline] +pub fn arc_ptr_eq<T: 'static>(a: &::std::sync::Arc<T>, b: &::std::sync::Arc<T>) -> bool { + ::style::ptr_eq::<T>(&**a, &**b) +} + +// We can't use stylearc for everything in layout, because the Flow stuff uses +// weak references. +use style::stylearc::Arc as StyleArc; |