Remove if-not-else patterns (#10402)

This commit is contained in:
Joseph T. Lyons 2024-04-11 03:48:06 -04:00 committed by GitHub
parent 36a87d0f5c
commit eb6f7c1240
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 99 additions and 99 deletions

View file

@ -1244,10 +1244,10 @@ impl ProjectSearchBar {
if let Some(search) = &self.active_project_search {
search.update(cx, |this, cx| {
this.replace_enabled = !this.replace_enabled;
let editor_to_focus = if !this.replace_enabled {
this.query_editor.focus_handle(cx)
} else {
let editor_to_focus = if this.replace_enabled {
this.replacement_editor.focus_handle(cx)
} else {
this.query_editor.focus_handle(cx)
};
cx.focus(&editor_to_focus);
cx.notify();