diff options
Diffstat (limited to 'components/script/dom/selection.rs')
-rw-r--r-- | components/script/dom/selection.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/components/script/dom/selection.rs b/components/script/dom/selection.rs index 207fa001d67..758a8608d2b 100644 --- a/components/script/dom/selection.rs +++ b/components/script/dom/selection.rs @@ -12,7 +12,7 @@ use crate::dom::bindings::codegen::Bindings::SelectionBinding::SelectionMethods; use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::refcounted::Trusted; -use crate::dom::bindings::reflector::{reflect_dom_object, DomGlobal, Reflector}; +use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object}; use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom}; use crate::dom::bindings::str::DOMString; use crate::dom::document::Document; @@ -167,11 +167,7 @@ impl SelectionMethods<crate::DomTypeHolder> for Selection { // https://w3c.github.io/selection-api/#dom-selection-rangecount fn RangeCount(&self) -> u32 { - if self.range.get().is_some() { - 1 - } else { - 0 - } + if self.range.get().is_some() { 1 } else { 0 } } // https://w3c.github.io/selection-api/#dom-selection-type |