From 8a8ee2888c3bd426daf6d4f294188a8f4f81653f Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Thu, 23 Feb 2017 21:47:23 +0100 Subject: [PATCH] Remove rustc-serialize from style and style_traits --- Cargo.lock | 2 -- components/style/Cargo.toml | 1 - components/style/lib.rs | 1 - components/style/properties/longhand/box.mako.rs | 2 +- components/style/properties/longhand/inherited_table.mako.rs | 2 +- components/style/values/mod.rs | 2 +- components/style_traits/Cargo.toml | 1 - components/style_traits/lib.rs | 1 - components/style_traits/values.rs | 2 +- 9 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2c395502984..850dd525aa3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2730,7 +2730,6 @@ dependencies = [ "phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.18.0", "serde 0.9.7 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 0.9.7 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2774,7 +2773,6 @@ dependencies = [ "euclid 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_derive 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.9.7 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 0.9.7 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml index 7576ec4b7ea..f41cf9b6b38 100644 --- a/components/style/Cargo.toml +++ b/components/style/Cargo.toml @@ -45,7 +45,6 @@ parking_lot = "0.3.3" phf = "0.7.20" pdqsort = "0.1.0" rayon = "0.6" -rustc-serialize = "0.3" selectors = { path = "../selectors" } serde = {version = "0.9", optional = true} serde_derive = {version = "0.9", optional = true} diff --git a/components/style/lib.rs b/components/style/lib.rs index d94f5436b51..5ab170ecf71 100644 --- a/components/style/lib.rs +++ b/components/style/lib.rs @@ -67,7 +67,6 @@ extern crate parking_lot; extern crate pdqsort; extern crate phf; extern crate rayon; -extern crate rustc_serialize; extern crate selectors; #[cfg(feature = "servo")] #[macro_use] extern crate serde_derive; #[cfg(feature = "servo")] #[macro_use] extern crate servo_atoms; diff --git a/components/style/properties/longhand/box.mako.rs b/components/style/properties/longhand/box.mako.rs index 56ef26e603e..ab4f9ac72a2 100644 --- a/components/style/properties/longhand/box.mako.rs +++ b/components/style/properties/longhand/box.mako.rs @@ -39,7 +39,7 @@ } #[allow(non_camel_case_types)] - #[derive(Clone, Eq, PartialEq, Copy, Hash, RustcEncodable, Debug)] + #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] #[cfg_attr(feature = "servo", derive(HeapSizeOf, Deserialize, Serialize))] pub enum SpecifiedValue { % for value in values: diff --git a/components/style/properties/longhand/inherited_table.mako.rs b/components/style/properties/longhand/inherited_table.mako.rs index b3cefca4304..c5effc7393e 100644 --- a/components/style/properties/longhand/inherited_table.mako.rs +++ b/components/style/properties/longhand/inherited_table.mako.rs @@ -31,7 +31,7 @@ ${helpers.single_keyword("caption-side", "top bottom", use app_units::Au; use properties::animated_properties::Interpolate; - #[derive(Clone, Copy, Debug, PartialEq, RustcEncodable)] + #[derive(Clone, Copy, Debug, PartialEq)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub struct T { pub horizontal: Au, diff --git a/components/style/values/mod.rs b/components/style/values/mod.rs index a1885f7552e..88867af58f9 100644 --- a/components/style/values/mod.rs +++ b/components/style/values/mod.rs @@ -19,7 +19,7 @@ macro_rules! define_numbered_css_keyword_enum { }; ($name: ident: $( $css: expr => $variant: ident = $value: expr ),+) => { #[allow(non_camel_case_types, missing_docs)] - #[derive(Clone, Eq, PartialEq, PartialOrd, Ord, Copy, RustcEncodable, Debug)] + #[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)] #[cfg_attr(feature = "servo", derive(HeapSizeOf, Deserialize, Serialize))] pub enum $name { $( $variant = $value ),+ diff --git a/components/style_traits/Cargo.toml b/components/style_traits/Cargo.toml index 2f28568aa6d..9d55a30f000 100644 --- a/components/style_traits/Cargo.toml +++ b/components/style_traits/Cargo.toml @@ -19,6 +19,5 @@ cssparser = "0.10" euclid = "0.11" heapsize = {version = "0.3.0", optional = true} heapsize_derive = {version = "0.1", optional = true} -rustc-serialize = "0.3" serde = {version = "0.9", optional = true} serde_derive = {version = "0.9", optional = true} diff --git a/components/style_traits/lib.rs b/components/style_traits/lib.rs index 4ee378833a4..062e671d442 100644 --- a/components/style_traits/lib.rs +++ b/components/style_traits/lib.rs @@ -19,7 +19,6 @@ extern crate cssparser; extern crate euclid; #[cfg(feature = "servo")] extern crate heapsize; #[cfg(feature = "servo")] #[macro_use] extern crate heapsize_derive; -extern crate rustc_serialize; #[cfg(feature = "servo")] #[macro_use] extern crate serde_derive; /// Opaque type stored in type-unsafe work queues for parallel layout. diff --git a/components/style_traits/values.rs b/components/style_traits/values.rs index 707c35f711e..3bf2505d96f 100644 --- a/components/style_traits/values.rs +++ b/components/style_traits/values.rs @@ -108,7 +108,7 @@ macro_rules! __define_css_keyword_enum__add_optional_traits { macro_rules! __define_css_keyword_enum__actual { ($name: ident [ $( $derived_trait: ident),* ] [ $( $css: expr => $variant: ident ),+ ]) => { #[allow(non_camel_case_types, missing_docs)] - #[derive(Clone, Eq, PartialEq, Copy, Hash, RustcEncodable, Debug $(, $derived_trait )* )] + #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq $(, $derived_trait )* )] pub enum $name { $( $variant ),+ }