diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-09-30 19:06:18 -0600 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-09-30 19:06:18 -0600 |
commit | 94e85a5226fe5b18bde40a2d5f6727b717bd148f (patch) | |
tree | c4ac4972811867509d341485c7216865e30b698d /components/script/dom/htmlselectelement.rs | |
parent | bb7742eecf00dd4cb5bfcbafcae36d928a5b8b89 (diff) | |
parent | b46243c00bda362df9891895d5496ace599971ea (diff) | |
download | servo-94e85a5226fe5b18bde40a2d5f6727b717bd148f.tar.gz servo-94e85a5226fe5b18bde40a2d5f6727b717bd148f.zip |
Auto merge of #7801 - aopicier:refactor_formcontrol, r=Manishearth
Refactor FormControl trait
The trait is now implemented for HTMLFooElement instead of
&HTMLFooElement and does no longer require an impl body.
Suggested by @Manishearth
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7801)
<!-- Reviewable:end -->
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 {} |