Remove unnecessary calls to WeakViewHandle::upgrade
This commit is contained in:
parent
94c2eaad23
commit
2b6830c798
19 changed files with 378 additions and 443 deletions
|
@ -2005,9 +2005,11 @@ impl NavHistory {
|
|||
}
|
||||
|
||||
fn did_update(&self, cx: &mut WindowContext) {
|
||||
if let Some(pane) = self.pane.upgrade(cx) {
|
||||
cx.defer(move |cx| pane.update(cx, |pane, cx| pane.history_updated(cx)));
|
||||
}
|
||||
let pane = self.pane.clone();
|
||||
cx.defer(move |cx| {
|
||||
pane.update(cx, |pane, cx| pane.history_updated(cx))
|
||||
.log_err();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue