Move cast into if block.

This commit is contained in:
Dongie Agnir 2015-10-23 13:59:02 -10:00
parent 663801ed79
commit ea21db6a0f

View file

@ -198,8 +198,8 @@ impl VirtualMethods for HTMLOptionElement {
self.upcast::<Element>().check_parent_disabled_state_for_option(); self.upcast::<Element>().check_parent_disabled_state_for_option();
let node = self.upcast::<Node>();
if self.Selected() { if self.Selected() {
let node = self.upcast::<Node>();
if let Some(select) = node.ancestors() if let Some(select) = node.ancestors()
.filter_map(Root::downcast::<HTMLSelectElement>) .filter_map(Root::downcast::<HTMLSelectElement>)
.next() { .next() {