aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/event.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-02-24 17:28:24 +0100
committerAnthony Ramine <n.oxyde@gmail.com>2016-02-24 17:52:17 +0100
commit0adfb080899104d4b51f6de3012ecf0558199b73 (patch)
tree60a23222f06c60f0f755158617d6256a23a1f5e2 /components/script/dom/event.rs
parentf7fb03518836ba45b0883aaaf3b8d38a6ff5eae1 (diff)
downloadservo-0adfb080899104d4b51f6de3012ecf0558199b73.tar.gz
servo-0adfb080899104d4b51f6de3012ecf0558199b73.zip
Implement From<DOMString> for Atom
Diffstat (limited to 'components/script/dom/event.rs')
-rw-r--r--components/script/dom/event.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/event.rs b/components/script/dom/event.rs
index bae9dea1433..5aa97872647 100644
--- a/components/script/dom/event.rs
+++ b/components/script/dom/event.rs
@@ -96,7 +96,7 @@ impl Event {
init: &EventBinding::EventInit) -> Fallible<Root<Event>> {
let bubbles = if init.bubbles { EventBubbles::Bubbles } else { EventBubbles::DoesNotBubble };
let cancelable = if init.cancelable { EventCancelable::Cancelable } else { EventCancelable::NotCancelable };
- Ok(Event::new(global, Atom::from(&*type_), bubbles, cancelable))
+ Ok(Event::new(global, Atom::from(type_), bubbles, cancelable))
}
pub fn init_event(&self, type_: Atom, bubbles: bool, cancelable: bool) {
@@ -240,7 +240,7 @@ impl EventMethods for Event {
type_: DOMString,
bubbles: bool,
cancelable: bool) {
- self.init_event(Atom::from(&*type_), bubbles, cancelable)
+ self.init_event(Atom::from(type_), bubbles, cancelable)
}
// https://dom.spec.whatwg.org/#dom-event-istrusted