aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/selection.rs
diff options
context:
space:
mode:
authorOluwatobi Sofela <60105594+oluwatobiss@users.noreply.github.com>2024-03-20 15:11:40 +0100
committerGitHub <noreply@github.com>2024-03-20 14:11:40 +0000
commit15bf32a4e615c0d663bc04a1b7b7adc038c993c5 (patch)
tree395b6a9088031535e3aca7f56c6ded6e941fb0fa /components/script/dom/selection.rs
parentd63615354cc02ceea08aaf3727530d4afa5b1876 (diff)
downloadservo-15bf32a4e615c0d663bc04a1b7b7adc038c993c5.tar.gz
servo-15bf32a4e615c0d663bc04a1b7b7adc038c993c5.zip
clippy: Fix unneeded return statement warnings (#31776)
Diffstat (limited to 'components/script/dom/selection.rs')
-rw-r--r--components/script/dom/selection.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/selection.rs b/components/script/dom/selection.rs
index ade8b3eff9f..2d5b3cb0474 100644
--- a/components/script/dom/selection.rs
+++ b/components/script/dom/selection.rs
@@ -359,7 +359,7 @@ impl SelectionMethods for Selection {
// Step 2
return Err(Error::InvalidState);
}
- return Ok(());
+ Ok(())
}
// https://w3c.github.io/selection-api/#dom-selection-setbaseandextent
@@ -447,7 +447,7 @@ impl SelectionMethods for Selection {
// selectionchange event as it would if if mutated any other way
return range.DeleteContents();
}
- return Ok(());
+ Ok(())
}
// https://w3c.github.io/selection-api/#dom-selection-containsnode
@@ -478,7 +478,7 @@ impl SelectionMethods for Selection {
if node == end_node {
return range.EndOffset() > 0;
}
- return true;
+ true
} else {
if node.is_before(start_node) {
return false;
@@ -493,11 +493,11 @@ impl SelectionMethods for Selection {
if node == end_node {
return range.EndOffset() == node.len();
}
- return true;
+ true
}
} else {
// No range
- return false;
+ false
}
}