Skip to content

Commit

Permalink
Auto merge of #15095 - servo:debug-servourl, r=nox
Browse files Browse the repository at this point in the history
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 -->
  • Loading branch information
bors-servo committed Jan 18, 2017
2 parents b08d4a7 + ce49647 commit 0cca7ca
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/url/lib.rs
Expand Up @@ -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>);

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 0cca7ca

Please sign in to comment.