mirror of
https://github.com/servo/servo.git
synced 2025-06-21 15:49:04 +01:00
Remove unnecessary mutability.
This commit is contained in:
parent
17796725f4
commit
179582d939
3 changed files with 3 additions and 3 deletions
|
@ -117,7 +117,7 @@ impl Document {
|
||||||
pub fn Constructor(owner: @mut Window) -> Fallible<AbstractDocument> {
|
pub fn Constructor(owner: @mut Window) -> Fallible<AbstractDocument> {
|
||||||
let cx = owner.page.js_info.get_ref().js_compartment.cx.ptr;
|
let cx = owner.page.js_info.get_ref().js_compartment.cx.ptr;
|
||||||
|
|
||||||
let mut document = AbstractDocument::as_abstract(cx, @mut Document::new(None, XML));
|
let document = AbstractDocument::as_abstract(cx, @mut Document::new(None, XML));
|
||||||
|
|
||||||
let root = @HTMLHtmlElement {
|
let root = @HTMLHtmlElement {
|
||||||
htmlelement: HTMLElement::new(HTMLHtmlElementTypeId, ~"html")
|
htmlelement: HTMLElement::new(HTMLHtmlElementTypeId, ~"html")
|
||||||
|
|
|
@ -42,7 +42,7 @@ impl DOMParser {
|
||||||
ty: DOMParserBinding::SupportedType)
|
ty: DOMParserBinding::SupportedType)
|
||||||
-> Fallible<AbstractDocument> {
|
-> Fallible<AbstractDocument> {
|
||||||
let cx = (*self.owner.page).js_info.get_ref().js_compartment.cx.ptr;
|
let cx = (*self.owner.page).js_info.get_ref().js_compartment.cx.ptr;
|
||||||
let mut document = match ty {
|
let document = match ty {
|
||||||
Text_html => {
|
Text_html => {
|
||||||
HTMLDocument::new(None)
|
HTMLDocument::new(None)
|
||||||
}
|
}
|
||||||
|
|
|
@ -722,7 +722,7 @@ impl ScriptTask {
|
||||||
page.next_subpage_id.clone(),
|
page.next_subpage_id.clone(),
|
||||||
self.constellation_chan.clone());
|
self.constellation_chan.clone());
|
||||||
|
|
||||||
let mut document = HTMLDocument::new(Some(window));
|
let document = HTMLDocument::new(Some(window));
|
||||||
|
|
||||||
let HtmlParserResult {root, discovery_port, url: final_url} = html_parsing_result;
|
let HtmlParserResult {root, discovery_port, url: final_url} = html_parsing_result;
|
||||||
document.set_root(root);
|
document.set_root(root);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue