Rename model
based variable names to entity
(#24198)
## Context While looking through the client crate, I noticed that some of the old functions and variables were still using gpui::model name that was deprecated during the gpui3 transition. This PR renames those instances of model to entity to be more inline with gpui3. In addition, I also renamed `model` to `entity` in cases found by the below search terms given by @someone13574 - model = cx. - model: Entity - model: &Entity - OpenedModelHandle - model.update - model.upgrade - model = .*\.root (regex) - parent_model - model = cx.new - cx.spawn(move |model Release Notes: - N/A
This commit is contained in:
parent
27d1c689cf
commit
8c7096f7a6
40 changed files with 332 additions and 327 deletions
|
@ -35,7 +35,7 @@ impl<E: 'static> DebouncedDelay<E> {
|
|||
self.cancel_channel = Some(sender);
|
||||
|
||||
let previous_task = self.task.take();
|
||||
self.task = Some(cx.spawn(move |model, mut cx| async move {
|
||||
self.task = Some(cx.spawn(move |entity, mut cx| async move {
|
||||
let mut timer = cx.background_executor().timer(delay).fuse();
|
||||
if let Some(previous_task) = previous_task {
|
||||
previous_task.await;
|
||||
|
@ -46,7 +46,7 @@ impl<E: 'static> DebouncedDelay<E> {
|
|||
_ = timer => {}
|
||||
}
|
||||
|
||||
if let Ok(task) = model.update(&mut cx, |project, cx| (func)(project, cx)) {
|
||||
if let Ok(task) = entity.update(&mut cx, |project, cx| (func)(project, cx)) {
|
||||
task.await;
|
||||
}
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue