mirror of
https://github.com/servo/servo.git
synced 2025-07-12 18:03:49 +01:00
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:
commit
0cca7ca85d
1 changed files with 7 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue