aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlbodyelement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/htmlbodyelement.rs')
-rw-r--r--components/script/dom/htmlbodyelement.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/components/script/dom/htmlbodyelement.rs b/components/script/dom/htmlbodyelement.rs
index 220578d0282..a6bd56bc85d 100644
--- a/components/script/dom/htmlbodyelement.rs
+++ b/components/script/dom/htmlbodyelement.rs
@@ -4,7 +4,7 @@
use dom::attr::{Attr, AttrHelpers};
use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
-use dom::bindings::codegen::Bindings::HTMLBodyElementBinding::{mod, HTMLBodyElementMethods};
+use dom::bindings::codegen::Bindings::HTMLBodyElementBinding::{self, HTMLBodyElementMethods};
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
use dom::bindings::codegen::InheritTypes::EventTargetCast;
use dom::bindings::codegen::InheritTypes::{HTMLBodyElementDerived, HTMLElementCast};
@@ -18,7 +18,9 @@ use dom::node::{Node, NodeTypeId, window_from_node};
use dom::virtualmethods::VirtualMethods;
use cssparser::RGBA;
-use servo_util::str::{mod, DOMString};
+use servo_util::str::{self, DOMString};
+
+use std::borrow::ToOwned;
use std::cell::Cell;
#[dom_struct]
@@ -76,7 +78,7 @@ impl HTMLBodyElementHelpers for HTMLBodyElement {
}
impl<'a> VirtualMethods for JSRef<'a, HTMLBodyElement> {
- fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> {
+ fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let element: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(element as &VirtualMethods)
}
@@ -106,7 +108,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLBodyElement> {
};
evtarget.set_event_handler_uncompiled(cx, url, reflector,
name.slice_from(2),
- attr.value().as_slice().into_string());
+ attr.value().as_slice().to_owned());
}
match attr.local_name() {