From 1f19d98ce76aa79a591089d33f358c6ecd540df8 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Wed, 3 May 2017 20:27:38 +0200 Subject: [PATCH] Remove dependency to rustc-serialize. rustc-serialize is deprecated in favor of serde and servo has moved to serde which means we don't need to carry this dependency anymore. --- Cargo.toml | 1 - src/length.rs | 1 - src/lib.rs | 3 +-- src/point.rs | 3 --- src/rect.rs | 1 - src/scale_factor.rs | 1 - src/size.rs | 1 - 7 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9ee733c..0f4ae53 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,6 @@ unstable = [] [dependencies] heapsize = "0.4" -rustc-serialize = "0.3.2" num-traits = {version = "0.1.32", default-features = false} log = "0.3.1" serde = "0.9" diff --git a/src/length.rs b/src/length.rs index 4d20bb9..f7df4d0 100644 --- a/src/length.rs +++ b/src/length.rs @@ -34,7 +34,6 @@ use std::fmt; // Uncomment the derive, and remove the macro call, once heapsize gets // PhantomData support. #[repr(C)] -#[derive(RustcDecodable, RustcEncodable)] pub struct Length(pub T, PhantomData); impl Clone for Length { diff --git a/src/lib.rs b/src/lib.rs index 2ed3edd..9c82709 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -59,7 +59,6 @@ extern crate heapsize; #[cfg_attr(test, macro_use)] extern crate log; -extern crate rustc_serialize; extern crate serde; #[cfg(test)] @@ -97,7 +96,7 @@ pub mod size; pub mod trig; /// The default unit. -#[derive(Clone, Copy, RustcDecodable, RustcEncodable)] +#[derive(Clone, Copy)] pub struct UnknownUnit; /// Unit for angles in radians. diff --git a/src/point.rs b/src/point.rs index 4503c56..bd6b3b9 100644 --- a/src/point.rs +++ b/src/point.rs @@ -20,7 +20,6 @@ use std::marker::PhantomData; define_matrix! { /// A 2d Point tagged with a unit. - #[derive(RustcDecodable, RustcEncodable)] pub struct TypedPoint2D { pub x: T, pub y: T, @@ -302,7 +301,6 @@ impl, U> ApproxEq> for TypedPoint2D define_matrix! { /// A 3d Point tagged with a unit. - #[derive(RustcDecodable, RustcEncodable)] pub struct TypedPoint3D { pub x: T, pub y: T, @@ -569,7 +567,6 @@ impl, U> ApproxEq> for TypedPoint3D define_matrix! { /// A 4d Point tagged with a unit. - #[derive(RustcDecodable, RustcEncodable)] pub struct TypedPoint4D { pub x: T, pub y: T, diff --git a/src/rect.rs b/src/rect.rs index 6d759b1..ef71c15 100644 --- a/src/rect.rs +++ b/src/rect.rs @@ -22,7 +22,6 @@ use std::fmt; use std::ops::{Add, Sub, Mul, Div}; /// A 2d Rectangle optionally tagged with a unit. -#[derive(RustcDecodable, RustcEncodable)] pub struct TypedRect { pub origin: TypedPoint2D, pub size: TypedSize2D, diff --git a/src/scale_factor.rs b/src/scale_factor.rs index 4ecfc4b..1181e49 100644 --- a/src/scale_factor.rs +++ b/src/scale_factor.rs @@ -37,7 +37,6 @@ use std::marker::PhantomData; /// let one_foot_in_mm: Length = one_foot * mm_per_inch; /// ``` #[repr(C)] -#[derive(RustcDecodable, RustcEncodable)] pub struct ScaleFactor(pub T, PhantomData<(Src, Dst)>); impl HeapSizeOf for ScaleFactor { diff --git a/src/size.rs b/src/size.rs index 0a97e4a..4d29358 100644 --- a/src/size.rs +++ b/src/size.rs @@ -19,7 +19,6 @@ use std::marker::PhantomData; /// A 2d size tagged with a unit. define_matrix! { - #[derive(RustcDecodable, RustcEncodable)] pub struct TypedSize2D { pub width: T, pub height: T,