diff options
author | Ms2ger <ms2ger@gmail.com> | 2014-06-10 17:48:42 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2014-06-11 19:51:08 +0200 |
commit | 23a6b6823ba844b97dba7bf29f1c9ea31ba27130 (patch) | |
tree | 7221c0dabd87f6bdccf32c4b3bec20ab0d173aa5 /src/components/script/dom/node.rs | |
parent | e9b64dc361db2b068a0079e599ad0725c2eb8a0c (diff) | |
download | servo-23a6b6823ba844b97dba7bf29f1c9ea31ba27130.tar.gz servo-23a6b6823ba844b97dba7bf29f1c9ea31ba27130.zip |
Use internal mutability for Document::{quirks_mode, encoding_name}.
Diffstat (limited to 'src/components/script/dom/node.rs')
-rw-r--r-- | src/components/script/dom/node.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/script/dom/node.rs b/src/components/script/dom/node.rs index 323ae5a1c14..a3d2132f601 100644 --- a/src/components/script/dom/node.rs +++ b/src/components/script/dom/node.rs @@ -1284,8 +1284,8 @@ impl Node { match node.type_id() { DocumentNodeTypeId => { let node_doc: &JSRef<Document> = DocumentCast::to_ref(node).unwrap(); - let copy_doc: &mut JSRef<Document> = DocumentCast::to_mut_ref(&mut *copy).unwrap(); - copy_doc.set_encoding_name(node_doc.encoding_name.clone()); + let copy_doc: &JSRef<Document> = DocumentCast::to_ref(&*copy).unwrap(); + copy_doc.set_encoding_name(node_doc.encoding_name.deref().borrow().clone()); copy_doc.set_quirks_mode(node_doc.quirks_mode()); }, ElementNodeTypeId(..) => { |