servo: Merge #15095 - Omit the 'ServoUrl()' wrapping in ServoUrl's Debug implementation (from servo:debug-servourl); r=nox
authorMs2ger <Ms2ger@gmail.com>
Wed, 18 Jan 2017 11:17:05 -0800
changeset 340604 8e40c66c1989bc06b73abd012001ea6d75b03cc0
parent 340603 d083caa045704181d17a7cdb732b3362f1911946
child 340605 eacb58edff9325a0c834da5649844a5d56ef0836
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnox
servo: Merge #15095 - Omit the 'ServoUrl()' wrapping in ServoUrl's Debug implementation (from servo:debug-servourl); r=nox Source-Repo: https://github.com/servo/servo Source-Revision: 0cca7ca85dc611952eeabd5b799e6c933dab7557
servo/components/url/lib.rs
--- a/servo/components/url/lib.rs
+++ b/servo/components/url/lib.rs
@@ -18,17 +18,17 @@ extern crate url;
 
 use std::fmt;
 use std::net::IpAddr;
 use std::ops::{Range, RangeFrom, RangeTo, RangeFull, Index};
 use std::path::Path;
 use std::sync::Arc;
 use url::{Url, Origin, Position};
 
-#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
+#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf, Serialize, Deserialize))]
 pub struct ServoUrl(Arc<Url>);
 
 impl ServoUrl {
     pub fn from_url(url: Url) -> Self {
         ServoUrl(Arc::new(url))
     }
 
@@ -153,16 +153,22 @@ impl ServoUrl {
 }
 
 impl fmt::Display for ServoUrl {
     fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
         self.0.fmt(formatter)
     }
 }
 
+impl fmt::Debug for ServoUrl {
+    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
+        self.0.fmt(formatter)
+    }
+}
+
 impl Index<RangeFull> for ServoUrl {
     type Output = str;
     fn index(&self, _: RangeFull) -> &str {
         &self.0[..]
     }
 }
 
 impl Index<RangeFrom<Position>> for ServoUrl {