mirror of
https://github.com/servo/servo.git
synced 2025-06-08 00:23:30 +00:00
Make parse_html's base_url argument non-optional.
It turns out the case where it woul be None can't happen.
This commit is contained in:
parent
c7c7dc03ee
commit
3e031bdaf8
2 changed files with 6 additions and 9 deletions
|
@ -728,7 +728,7 @@ impl ScriptTask {
|
|||
} else {
|
||||
url.clone()
|
||||
};
|
||||
let document = Document::new(*window, Some(doc_url), HTMLDocument,
|
||||
let document = Document::new(*window, Some(doc_url.clone()), HTMLDocument,
|
||||
None, FromParser).root();
|
||||
|
||||
window.init_browser_context(*document);
|
||||
|
@ -783,13 +783,10 @@ impl ScriptTask {
|
|||
*page.mut_url() = Some((base_url.clone(), true));
|
||||
}
|
||||
|
||||
(Some(base_url), Some(load_response))
|
||||
(base_url, Some(load_response))
|
||||
},
|
||||
InputString(_) => {
|
||||
match *page.url() {
|
||||
Some((ref page_url, _)) => (Some(page_url.clone()), None),
|
||||
None => (None, None),
|
||||
}
|
||||
(doc_url, None)
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue