mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
clippy: Fix unneeded return statement warnings (#31776)
This commit is contained in:
parent
d63615354c
commit
15bf32a4e6
19 changed files with 31 additions and 38 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue