mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
Upgrade to rust-url 1.0 and hyper 0.9
This commit is contained in:
parent
305c283602
commit
7932ab6ac2
76 changed files with 524 additions and 888 deletions
|
@ -68,7 +68,7 @@ impl HTMLBaseElementMethods for HTMLBaseElement {
|
|||
|
||||
// Step 1.
|
||||
if !self.upcast::<Element>().has_attribute(&atom!("href")) {
|
||||
return DOMString::from(document.base_url().serialize());
|
||||
return DOMString::from(document.base_url().as_str());
|
||||
}
|
||||
|
||||
// Step 2.
|
||||
|
@ -81,7 +81,7 @@ impl HTMLBaseElementMethods for HTMLBaseElement {
|
|||
let url_record = fallback_base_url.join(&*url);
|
||||
|
||||
// Step 5, 6.
|
||||
DOMString::from(url_record.ok().map_or("".to_owned(), |record| record.serialize()))
|
||||
DOMString::from(url_record.as_ref().map(|url| url.as_str()).unwrap_or(""))
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-base-href
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue