Upgrade to rust-url 1.0 and hyper 0.9

This commit is contained in:
Simon Sapin 2016-04-21 00:18:37 +02:00
parent 305c283602
commit 7932ab6ac2
76 changed files with 524 additions and 888 deletions

View file

@ -515,7 +515,7 @@ impl Document {
self.GetDocumentElement()
} else {
// Step 3 & 4
String::from_utf8(percent_decode(fragid.as_bytes())).ok()
percent_decode(fragid.as_bytes()).decode_utf8().ok()
// Step 5
.and_then(|decoded_fragid| self.get_element_by_id(&Atom::from(decoded_fragid)))
// Step 6
@ -1585,7 +1585,7 @@ impl LayoutDocumentHelpers for LayoutJS<Document> {
/// https://url.spec.whatwg.org/#network-scheme
fn url_has_network_scheme(url: &Url) -> bool {
match &*url.scheme {
match url.scheme() {
"ftp" | "http" | "https" => true,
_ => false,
}
@ -1844,7 +1844,7 @@ impl DocumentMethods for Document {
// https://dom.spec.whatwg.org/#dom-document-url
fn URL(&self) -> DOMString {
DOMString::from(self.url().serialize())
DOMString::from(self.url().as_str())
}
// https://html.spec.whatwg.org/multipage/#dom-document-activeelement
@ -1886,7 +1886,7 @@ impl DocumentMethods for Document {
if let Some(host) = self.origin.host() {
// Step 4.
DOMString::from(host.serialize())
DOMString::from(host.to_string())
} else {
// Step 3.
DOMString::new()