aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/parse/html.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-04-25 17:05:08 +0200
committerMs2ger <ms2ger@gmail.com>2015-04-26 10:52:55 +0200
commita862479ca801c92bbb744eb769e59d177435fb63 (patch)
treed2cb8c7a55dac2e68ab02c48bd07ea0165ff74b6 /components/script/parse/html.rs
parentef536372cdf26e5fd2ac7728e76482dc5d702cd0 (diff)
downloadservo-a862479ca801c92bbb744eb769e59d177435fb63.tar.gz
servo-a862479ca801c92bbb744eb769e59d177435fb63.zip
Remove as_slice() calls from script.
Diffstat (limited to 'components/script/parse/html.rs')
-rw-r--r--components/script/parse/html.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/parse/html.rs b/components/script/parse/html.rs
index e67624441fe..21a37505b53 100644
--- a/components/script/parse/html.rs
+++ b/components/script/parse/html.rs
@@ -244,7 +244,7 @@ impl<'a> Serializable for JSRef<'a, Node> {
(IncludeNode, NodeTypeId::DocumentType) => {
let doctype: JSRef<DocumentType> = DocumentTypeCast::to_ref(node).unwrap();
- serializer.write_doctype(doctype.name().as_slice())
+ serializer.write_doctype(&doctype.name())
},
(IncludeNode, NodeTypeId::Text) => {
@@ -290,7 +290,7 @@ pub fn parse_html(document: JSRef<Document>,
match msg {
ProgressMsg::Payload(data) => {
// FIXME: use Vec<u8> (html5ever #34)
- let data = UTF_8.decode(data.as_slice(), DecoderTrap::Replace).unwrap();
+ let data = UTF_8.decode(&data, DecoderTrap::Replace).unwrap();
parser.parse_chunk(data);
}
ProgressMsg::Done(Err(err)) => {