Skip to content

Commit 2a299bf

Browse files
committed
Drop rustc-serialize support
1 parent 2a33ec6 commit 2a299bf

File tree

3 files changed

+0
-36
lines changed

3 files changed

+0
-36
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,5 @@ env:
55
matrix:
66
- FEATURES=
77
- FEATURES="serde"
8-
- FEATURES="rustc-serialize"
9-
- FEATURES="serde rustc-serialize"
108
script:
119
- cargo test -v --features "$FEATURES"

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ repository = "https://github.com/reem/rust-ordered-float"
1010
[dependencies]
1111
num-traits = { version = "0.1", default_features = false }
1212
serde = { version = "1.0", optional = true }
13-
rustc-serialize = { version = "0.3", optional = true }
1413
unreachable = "0.1"
1514

1615
[dev-dependencies]

src/lib.rs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -559,39 +559,6 @@ fn raw_double_bits<F: Float>(f: &F) -> u64 {
559559
(man & MAN_MASK) | ((exp_u64 << 52) & EXP_MASK) | ((sign_u64 << 63) & SIGN_MASK)
560560
}
561561

562-
#[cfg(feature = "rustc-serialize")]
563-
mod impl_rustc {
564-
extern crate rustc_serialize;
565-
use self::rustc_serialize::{Encodable, Encoder, Decodable, Decoder};
566-
use super::{OrderedFloat, NotNaN};
567-
use std::error::Error;
568-
use num_traits::Float;
569-
570-
impl<T: Float + Encodable> Encodable for OrderedFloat<T> {
571-
fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
572-
self.0.encode(s)
573-
}
574-
}
575-
576-
impl<T: Float + Decodable> Decodable for OrderedFloat<T> {
577-
fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error> {
578-
T::decode(d).map(OrderedFloat)
579-
}
580-
}
581-
582-
impl<T: Float + Encodable> Encodable for NotNaN<T> {
583-
fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
584-
self.0.encode(s)
585-
}
586-
}
587-
588-
impl<T: Float + Decodable> Decodable for NotNaN<T> {
589-
fn decode<D: Decoder>(d: &mut D) -> Result<Self, D::Error> {
590-
T::decode(d).and_then(|v| NotNaN::new(v).map_err(|e| d.error(e.description())))
591-
}
592-
}
593-
}
594-
595562
#[cfg(feature = "serde")]
596563
mod impl_serde {
597564
extern crate serde;

0 commit comments

Comments
 (0)