mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fix some no_move errors
This commit is contained in:
parent
63714ebc5f
commit
dcb0a0eab6
17 changed files with 46 additions and 34 deletions
|
@ -1195,7 +1195,7 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
|
|||
|
||||
match title {
|
||||
None => DOMString::new(),
|
||||
Some(title) => {
|
||||
Some(ref title) => {
|
||||
// Steps 3-4.
|
||||
let value = Node::collect_text_contents(title.r().children());
|
||||
split_html_space_chars(&value).collect::<Vec<_>>().connect(" ")
|
||||
|
@ -1310,9 +1310,9 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
|
|||
return Ok(());
|
||||
}
|
||||
|
||||
match (self.get_html_element().root(), old_body) {
|
||||
match (self.get_html_element().root(), &old_body) {
|
||||
// Step 3.
|
||||
(Some(ref root), Some(ref child)) => {
|
||||
(Some(ref root), &Some(ref child)) => {
|
||||
let root: JSRef<Node> = NodeCast::from_ref(root.r());
|
||||
let child: JSRef<Node> = NodeCast::from_ref(child.r());
|
||||
let new_body: JSRef<Node> = NodeCast::from_ref(new_body);
|
||||
|
@ -1323,7 +1323,7 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
|
|||
(None, _) => return Err(HierarchyRequest),
|
||||
|
||||
// Step 5.
|
||||
(Some(ref root), None) => {
|
||||
(Some(ref root), &None) => {
|
||||
let root: JSRef<Node> = NodeCast::from_ref(root.r());
|
||||
let new_body: JSRef<Node> = NodeCast::from_ref(new_body);
|
||||
assert!(root.AppendChild(new_body).is_ok());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue