mirror of
https://github.com/servo/servo
synced 2026-05-03 12:52:25 +02:00
Upgrade to rust-url 1.0 and hyper 0.9
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user