Skip to content

Commit db4b5a4

Browse files
committed
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.
1 parent 2e146e2 commit db4b5a4

File tree

7 files changed

+1
-10
lines changed

7 files changed

+1
-10
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ unstable = []
1414

1515
[dependencies]
1616
heapsize = "0.3"
17-
rustc-serialize = "0.3.2"
1817
num-traits = {version = "0.1.32", default-features = false}
1918
log = "0.3.1"
2019
serde = "0.9"

src/length.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ use std::fmt;
3434
// Uncomment the derive, and remove the macro call, once heapsize gets
3535
// PhantomData<T> support.
3636
#[repr(C)]
37-
#[derive(RustcDecodable, RustcEncodable)]
3837
pub struct Length<T, Unit>(pub T, PhantomData<Unit>);
3938

4039
impl<T: Clone, Unit> Clone for Length<T, Unit> {

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ extern crate heapsize;
5959

6060
#[cfg_attr(test, macro_use)]
6161
extern crate log;
62-
extern crate rustc_serialize;
6362
extern crate serde;
6463

6564
#[cfg(test)]
@@ -97,7 +96,7 @@ pub mod size;
9796
pub mod trig;
9897

9998
/// The default unit.
100-
#[derive(Clone, Copy, RustcDecodable, RustcEncodable)]
99+
#[derive(Clone, Copy)]
101100
pub struct UnknownUnit;
102101

103102
/// Unit for angles in radians.

src/point.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ use std::marker::PhantomData;
2020

2121
define_matrix! {
2222
/// A 2d Point tagged with a unit.
23-
#[derive(RustcDecodable, RustcEncodable)]
2423
pub struct TypedPoint2D<T, U> {
2524
pub x: T,
2625
pub y: T,
@@ -296,7 +295,6 @@ impl<T: Copy+ApproxEq<T>, U> ApproxEq<TypedPoint2D<T, U>> for TypedPoint2D<T, U>
296295

297296
define_matrix! {
298297
/// A 3d Point tagged with a unit.
299-
#[derive(RustcDecodable, RustcEncodable)]
300298
pub struct TypedPoint3D<T, U> {
301299
pub x: T,
302300
pub y: T,
@@ -563,7 +561,6 @@ impl<T: Copy+ApproxEq<T>, U> ApproxEq<TypedPoint3D<T, U>> for TypedPoint3D<T, U>
563561

564562
define_matrix! {
565563
/// A 4d Point tagged with a unit.
566-
#[derive(RustcDecodable, RustcEncodable)]
567564
pub struct TypedPoint4D<T, U> {
568565
pub x: T,
569566
pub y: T,

src/rect.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ use std::fmt;
2222
use std::ops::{Add, Sub, Mul, Div};
2323

2424
/// A 2d Rectangle optionally tagged with a unit.
25-
#[derive(RustcDecodable, RustcEncodable)]
2625
pub struct TypedRect<T, U = UnknownUnit> {
2726
pub origin: TypedPoint2D<T, U>,
2827
pub size: TypedSize2D<T, U>,

src/scale_factor.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ use std::marker::PhantomData;
3737
/// let one_foot_in_mm: Length<f32, Mm> = one_foot * mm_per_inch;
3838
/// ```
3939
#[repr(C)]
40-
#[derive(RustcDecodable, RustcEncodable)]
4140
pub struct ScaleFactor<T, Src, Dst>(pub T, PhantomData<(Src, Dst)>);
4241

4342
impl<T: HeapSizeOf, Src, Dst> HeapSizeOf for ScaleFactor<T, Src, Dst> {

src/size.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use std::marker::PhantomData;
1919

2020
/// A 2d size tagged with a unit.
2121
define_matrix! {
22-
#[derive(RustcDecodable, RustcEncodable)]
2322
pub struct TypedSize2D<T, U> {
2423
pub width: T,
2524
pub height: T,

0 commit comments

Comments
 (0)