зеркало из https://github.com/mozilla/gecko-dev.git
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
This commit is contained in:
Родитель
731d66d2f4
Коммит
820079fcfc
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче