diff options
author | Oluwatobi Sofela <60105594+oluwatobiss@users.noreply.github.com> | 2024-03-20 15:11:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-20 14:11:40 +0000 |
commit | 15bf32a4e615c0d663bc04a1b7b7adc038c993c5 (patch) | |
tree | 395b6a9088031535e3aca7f56c6ded6e941fb0fa /components/script/dom/node.rs | |
parent | d63615354cc02ceea08aaf3727530d4afa5b1876 (diff) | |
download | servo-15bf32a4e615c0d663bc04a1b7b7adc038c993c5.tar.gz servo-15bf32a4e615c0d663bc04a1b7b7adc038c993c5.zip |
clippy: Fix unneeded return statement warnings (#31776)
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r-- | components/script/dom/node.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index b3ca725ce8b..03377c571ca 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -3016,15 +3016,15 @@ impl NodeMethods for Node { match (node1, node2) { (None, _) => { // node1 is null - return NodeConstants::DOCUMENT_POSITION_FOLLOWING + + NodeConstants::DOCUMENT_POSITION_FOLLOWING + NodeConstants::DOCUMENT_POSITION_DISCONNECTED + - NodeConstants::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC; + NodeConstants::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC }, (_, None) => { // node2 is null - return NodeConstants::DOCUMENT_POSITION_PRECEDING + + NodeConstants::DOCUMENT_POSITION_PRECEDING + NodeConstants::DOCUMENT_POSITION_DISCONNECTED + - NodeConstants::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC; + NodeConstants::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC }, (Some(node1), Some(node2)) => { // still step 6, testing if node1 and 2 share a root @@ -3080,13 +3080,13 @@ impl NodeMethods for Node { // contained in the other. // // If we're the container, return that `other` is contained by us. - return if self_and_ancestors.len() < other_and_ancestors.len() { + if self_and_ancestors.len() < other_and_ancestors.len() { NodeConstants::DOCUMENT_POSITION_FOLLOWING + NodeConstants::DOCUMENT_POSITION_CONTAINED_BY } else { NodeConstants::DOCUMENT_POSITION_PRECEDING + NodeConstants::DOCUMENT_POSITION_CONTAINS - }; + } }, } } |