Skip to content

Commit

Permalink
chore(header): fix unused doc comment warning in Origin
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Jul 31, 2017
1 parent 4922bb9 commit a900495
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/header/common/origin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ impl FromStr for Origin {

impl fmt::Display for Origin {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
&Origin(OriginOrNull::Origin { ref scheme, ref host }) => write!(f, "{}://{}", scheme, host),
/// Serialized as "null" per ASCII serialization of an origin
/// https://html.spec.whatwg.org/multipage/browsers.html#ascii-serialisation-of-an-origin
_ => write!(f, "null")
match self.0 {
OriginOrNull::Origin { ref scheme, ref host } => write!(f, "{}://{}", scheme, host),
// Serialized as "null" per ASCII serialization of an origin
// https://html.spec.whatwg.org/multipage/browsers.html#ascii-serialisation-of-an-origin
OriginOrNull::Null => f.write_str("null")
}
}
}
Expand Down

0 comments on commit a900495

Please sign in to comment.