Remove if-not-else patterns (#10402)
This commit is contained in:
parent
36a87d0f5c
commit
eb6f7c1240
24 changed files with 99 additions and 99 deletions
|
@ -2737,15 +2737,15 @@ impl Project {
|
|||
futures::future::join_all(tasks).await;
|
||||
|
||||
this.update(&mut cx, |this, cx| {
|
||||
if !this.buffers_needing_diff.is_empty() {
|
||||
this.recalculate_buffer_diffs(cx).detach();
|
||||
} else {
|
||||
if this.buffers_needing_diff.is_empty() {
|
||||
// TODO: Would a `ModelContext<Project>.notify()` suffice here?
|
||||
for buffer in buffers {
|
||||
if let Some(buffer) = buffer.upgrade() {
|
||||
buffer.update(cx, |_, cx| cx.notify());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.recalculate_buffer_diffs(cx).detach();
|
||||
}
|
||||
})
|
||||
.ok();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue