diff options
author | Philipp Hartwig <ph@phhart.de> | 2015-09-30 22:02:56 +0200 |
---|---|---|
committer | Philipp Hartwig <ph@phhart.de> | 2015-09-30 22:02:56 +0200 |
commit | bae4abd388fd4f27335704f8dfe590809691f765 (patch) | |
tree | fcbd9fc4c6b16ef8ec5e81c81b4d3ad98755a188 /components/script/dom/htmlselectelement.rs | |
parent | a72d7a4f5222d029a34b2b4a7da21ebe095fde53 (diff) | |
download | servo-bae4abd388fd4f27335704f8dfe590809691f765.tar.gz servo-bae4abd388fd4f27335704f8dfe590809691f765.zip |
Refactor FormControl trait
The trait is now implemented for HTMLFooElement instead of
&HTMLFooElement and does no longer require an impl body.
Diffstat (limited to 'components/script/dom/htmlselectelement.rs')
-rw-r--r-- | components/script/dom/htmlselectelement.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/components/script/dom/htmlselectelement.rs b/components/script/dom/htmlselectelement.rs index 48aea7422ee..8c6b73c564b 100644 --- a/components/script/dom/htmlselectelement.rs +++ b/components/script/dom/htmlselectelement.rs @@ -5,13 +5,13 @@ use dom::attr::{Attr, AttrValue}; use dom::bindings::codegen::Bindings::HTMLSelectElementBinding; use dom::bindings::codegen::Bindings::HTMLSelectElementBinding::HTMLSelectElementMethods; -use dom::bindings::codegen::InheritTypes::{ElementCast, HTMLElementCast, NodeCast}; +use dom::bindings::codegen::InheritTypes::{HTMLElementCast, NodeCast}; use dom::bindings::codegen::InheritTypes::{HTMLFieldSetElementDerived, HTMLSelectElementDerived}; use dom::bindings::codegen::UnionTypes::HTMLElementOrLong; use dom::bindings::codegen::UnionTypes::HTMLOptionElementOrHTMLOptGroupElement; 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}; @@ -161,8 +161,4 @@ impl VirtualMethods for HTMLSelectElement { } } -impl<'a> FormControl<'a> for &'a HTMLSelectElement { - fn to_element(self) -> &'a Element { - ElementCast::from_ref(self) - } -} +impl FormControl for HTMLSelectElement {} |