From bae4abd388fd4f27335704f8dfe590809691f765 Mon Sep 17 00:00:00 2001 From: Philipp Hartwig Date: Wed, 30 Sep 2015 22:02:56 +0200 Subject: Refactor FormControl trait The trait is now implemented for HTMLFooElement instead of &HTMLFooElement and does no longer require an impl body. --- components/script/dom/htmlobjectelement.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'components/script/dom/htmlobjectelement.rs') diff --git a/components/script/dom/htmlobjectelement.rs b/components/script/dom/htmlobjectelement.rs index e197f1d60c4..fb6c7a39860 100644 --- a/components/script/dom/htmlobjectelement.rs +++ b/components/script/dom/htmlobjectelement.rs @@ -10,7 +10,7 @@ use dom::bindings::codegen::InheritTypes::HTMLObjectElementDerived; use dom::bindings::codegen::InheritTypes::{ElementCast, HTMLElementCast}; use dom::bindings::js::Root; use dom::document::Document; -use dom::element::{AttributeMutation, Element, ElementTypeId}; +use dom::element::{AttributeMutation, ElementTypeId}; use dom::eventtarget::{EventTarget, EventTargetTypeId}; use dom::htmlelement::{HTMLElement, HTMLElementTypeId}; use dom::htmlformelement::{FormControl, HTMLFormElement}; @@ -119,8 +119,4 @@ impl VirtualMethods for HTMLObjectElement { } } -impl<'a> FormControl<'a> for &'a HTMLObjectElement { - fn to_element(self) -> &'a Element { - ElementCast::from_ref(self) - } -} +impl FormControl for HTMLObjectElement {} -- cgit v1.2.3