aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/element.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-05-01 14:44:19 -0500
committerbors-servo <metajack+bors@gmail.com>2015-05-01 14:44:19 -0500
commit2f0b805fad2419518f0d80e90cf322fbd507a916 (patch)
treef067ead0c24f369bcafe3e3a2fc084ac0fd95647 /components/script/dom/element.rs
parent5f6a740190e1e5912d84162c92c6b79365df165a (diff)
parent99d6f83b663fb40c70357cd0389e7f705e95ee8e (diff)
downloadservo-2f0b805fad2419518f0d80e90cf322fbd507a916.tar.gz
servo-2f0b805fad2419518f0d80e90cf322fbd507a916.zip
Auto merge of #5916 - servo:prepare-rustup, r=jdm
<!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5916) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r--components/script/dom/element.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index a936e783ad4..deb2df56b84 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -83,7 +83,7 @@ use std::borrow::{IntoCow, ToOwned};
use std::cell::{Ref, RefMut};
use std::default::Default;
use std::mem;
-use std::old_io::{MemWriter, Writer};
+use std::old_io::Writer;
use std::sync::Arc;
#[dom_struct]
@@ -571,13 +571,13 @@ impl<'a> ElementHelpers<'a> for JSRef<'a, Element> {
fn serialize(self, traversal_scope: TraversalScope) -> Fallible<DOMString> {
let node: JSRef<Node> = NodeCast::from_ref(self);
- let mut writer = MemWriter::new();
+ let mut writer = vec![];
match serialize(&mut writer, &node,
SerializeOpts {
traversal_scope: traversal_scope,
.. Default::default()
}) {
- Ok(()) => Ok(String::from_utf8(writer.into_inner()).unwrap()),
+ Ok(()) => Ok(String::from_utf8(writer).unwrap()),
Err(_) => panic!("Cannot serialize element"),
}
}