From 68014af78e8e3f5de4df0f6cc4d63b99c77478f5 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Wed, 7 Oct 2015 14:55:02 +0200 Subject: Clean up the cast calls --- components/script/dom/htmlselectelement.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'components/script/dom/htmlselectelement.rs') 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::(); - Some(htmlelement as &VirtualMethods) + Some(self.upcast::() 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::(); - el.check_ancestors_disabled_state_for_form_control(); + self.upcast::().check_ancestors_disabled_state_for_form_control(); } fn unbind_from_tree(&self, tree_in_doc: bool) { -- cgit v1.2.3