Auto merge of #15095 - servo:debug-servourl, r=nox

Omit the 'ServoUrl()' wrapping in ServoUrl's Debug implementation.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15095)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-01-18 11:17:05 -08:00 committed by GitHub
commit 0cca7ca85d

View file

@ -23,7 +23,7 @@ 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>);
@ -158,6 +158,12 @@ impl fmt::Display for ServoUrl {
}
}
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 {