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

This commit is contained in:
Ms2ger 2017-01-18 15:43:29 +01:00
parent 80c6383140
commit ce496472f8

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 {