diff --git a/Cargo.toml b/Cargo.toml index 40e6b64f5..4a3ddf452 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,6 @@ heapsize = {version = ">=0.4.1, <0.5", optional = true} idna = { version = "0.1.0", path = "./idna" } matches = "0.1" percent-encoding = { version = "1.0.0", path = "./percent_encoding" } -rustc-serialize = {version = "0.3", optional = true} serde = {version = ">=0.6.1, <0.9", optional = true} [[bench]] diff --git a/src/lib.rs b/src/lib.rs index 203b973bb..cc33b40cd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -107,7 +107,6 @@ assert_eq!(css_url.as_str(), "http://servo.github.io/rust-url/main.css"); #![doc(html_root_url = "https://docs.rs/url/1.7.0")] -#[cfg(feature="rustc-serialize")] extern crate rustc_serialize; #[macro_use] extern crate matches; #[cfg(feature="serde")] extern crate serde; #[cfg(feature="heapsize")] #[macro_use] extern crate heapsize; @@ -2226,23 +2225,6 @@ impl RangeArg for RangeTo { } } -#[cfg(feature="rustc-serialize")] -impl rustc_serialize::Encodable for Url { - fn encode(&self, encoder: &mut S) -> Result<(), S::Error> { - encoder.emit_str(self.as_str()) - } -} - - -#[cfg(feature="rustc-serialize")] -impl rustc_serialize::Decodable for Url { - fn decode(decoder: &mut D) -> Result { - Url::parse(&*decoder.read_str()?).map_err(|error| { - decoder.error(&format!("URL parsing error: {}", error)) - }) - } -} - /// Serializes this URL into a `serde` stream. /// /// This implementation is only available if the `serde` Cargo feature is enabled.