diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2015-10-07 14:55:02 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2015-10-21 11:40:34 +0200 |
commit | 68014af78e8e3f5de4df0f6cc4d63b99c77478f5 (patch) | |
tree | f65b1a66ad8d7ce65042e37cf654da75e1766939 /components/script/dom/htmlselectelement.rs | |
parent | 13ea3ac413c511872784ccde416956217746553c (diff) | |
download | servo-68014af78e8e3f5de4df0f6cc4d63b99c77478f5.tar.gz servo-68014af78e8e3f5de4df0f6cc4d63b99c77478f5.zip |
Clean up the cast calls
Diffstat (limited to 'components/script/dom/htmlselectelement.rs')
-rw-r--r-- | components/script/dom/htmlselectelement.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/components/script/dom/htmlselectelement.rs b/components/script/dom/htmlselectelement.rs index 238d6a6f1de..f82eddf39fe 100644 --- a/components/script/dom/htmlselectelement.rs +++ b/components/script/dom/htmlselectelement.rs @@ -101,8 +101,7 @@ impl HTMLSelectElementMethods for HTMLSelectElement { impl VirtualMethods for HTMLSelectElement { fn super_type(&self) -> Option<&VirtualMethods> { - let htmlelement: &HTMLElement = self.upcast::<HTMLElement>(); - Some(htmlelement as &VirtualMethods) + Some(self.upcast::<HTMLElement>() as &VirtualMethods) } fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) { @@ -128,8 +127,7 @@ impl VirtualMethods for HTMLSelectElement { s.bind_to_tree(tree_in_doc); } - let el = self.upcast::<Element>(); - el.check_ancestors_disabled_state_for_form_control(); + self.upcast::<Element>().check_ancestors_disabled_state_for_form_control(); } fn unbind_from_tree(&self, tree_in_doc: bool) { |