aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/range.rs
diff options
context:
space:
mode:
authorAarya Khandelwal <119049564+Aaryakhandelwal@users.noreply.github.com>2024-03-25 16:58:12 +0530
committerGitHub <noreply@github.com>2024-03-25 11:28:12 +0000
commitbd39e03eeb3d369e8189135326c733bbe5a3bb10 (patch)
tree32bb57b214bed8890d359701ef326f7231255eff /components/script/dom/range.rs
parent9a76dd9325794346163e858831abb97de4b41e41 (diff)
downloadservo-bd39e03eeb3d369e8189135326c733bbe5a3bb10.tar.gz
servo-bd39e03eeb3d369e8189135326c733bbe5a3bb10.zip
changed `match` to 'matches!' (#31850)
Diffstat (limited to 'components/script/dom/range.rs')
-rw-r--r--components/script/dom/range.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/range.rs b/components/script/dom/range.rs
index 7033ce82834..72bd5350f6d 100644
--- a/components/script/dom/range.rs
+++ b/components/script/dom/range.rs
@@ -127,13 +127,13 @@ impl Range {
/// <https://dom.spec.whatwg.org/#contained>
fn contains(&self, node: &Node) -> bool {
- match (
- bp_position(node, 0, &self.start_container(), self.start_offset()),
- bp_position(node, node.len(), &self.end_container(), self.end_offset()),
- ) {
- (Some(Ordering::Greater), Some(Ordering::Less)) => true,
- _ => false,
- }
+ matches!(
+ (
+ bp_position(node, 0, &self.start_container(), self.start_offset()),
+ bp_position(node, node.len(), &self.end_container(), self.end_offset()),
+ ),
+ (Some(Ordering::Greater), Some(Ordering::Less))
+ )
}
/// <https://dom.spec.whatwg.org/#partially-contained>