From 2ed2151b3dfe9e98ad997a64b4cf334b967e5db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Thu, 9 May 2019 10:49:50 +0000 Subject: [PATCH] style: Move OwnedSlice to style_traits. Differential Revision: https://phabricator.services.mozilla.com/D30126 --- components/style/lib.rs | 3 +-- components/style_traits/lib.rs | 1 + components/{style => style_traits}/owned_slice.rs | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) rename components/{style => style_traits}/owned_slice.rs (99%) diff --git a/components/style/lib.rs b/components/style/lib.rs index 65f2eda52ff..10d45408065 100644 --- a/components/style/lib.rs +++ b/components/style/lib.rs @@ -143,7 +143,6 @@ pub mod logical_geometry; pub mod matching; #[macro_use] pub mod media_queries; -pub mod owned_slice; pub mod parallel; pub mod parser; pub mod rule_cache; @@ -189,7 +188,7 @@ pub use html5ever::Prefix; #[cfg(feature = "servo")] pub use servo_atoms::Atom; -pub use owned_slice::OwnedSlice; +pub use style_traits::owned_slice::OwnedSlice; /// The CSS properties supported by the style system. /// Generated from the properties.mako.rs template by build.rs diff --git a/components/style_traits/lib.rs b/components/style_traits/lib.rs index bce0a507f75..14ce2c9801e 100644 --- a/components/style_traits/lib.rs +++ b/components/style_traits/lib.rs @@ -89,6 +89,7 @@ pub mod specified_value_info; pub mod values; #[macro_use] pub mod viewport; +pub mod owned_slice; pub use crate::specified_value_info::{CssType, KeywordsCollectFn, SpecifiedValueInfo}; pub use crate::values::{ diff --git a/components/style/owned_slice.rs b/components/style_traits/owned_slice.rs similarity index 99% rename from components/style/owned_slice.rs rename to components/style_traits/owned_slice.rs index e1a82c0176f..6e54aaeef5f 100644 --- a/components/style/owned_slice.rs +++ b/components/style_traits/owned_slice.rs @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +#![allow(unsafe_code)] + //! A replacement for `Box<[T]>` that cbindgen can understand. use std::marker::PhantomData;