mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
clippy: Fix collapsible_else_if warnings (#31853)
This commit is contained in:
parent
d814d05539
commit
f8a2eaea47
8 changed files with 37 additions and 52 deletions
|
@ -627,15 +627,13 @@ impl<T: ClipboardProvider> TextInput<T> {
|
|||
if self.selection_origin.is_none() {
|
||||
self.selection_origin = Some(self.edit_point);
|
||||
}
|
||||
} else {
|
||||
if self.has_selection() {
|
||||
self.edit_point = match adjust {
|
||||
Direction::Backward => self.selection_start(),
|
||||
Direction::Forward => self.selection_end(),
|
||||
};
|
||||
self.clear_selection();
|
||||
return true;
|
||||
}
|
||||
} else if self.has_selection() {
|
||||
self.edit_point = match adjust {
|
||||
Direction::Backward => self.selection_start(),
|
||||
Direction::Forward => self.selection_end(),
|
||||
};
|
||||
self.clear_selection();
|
||||
return true;
|
||||
}
|
||||
false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue