Simplify the SerializableItem::cleanup implementation (#29567)
Release Notes: - N/A --------- Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
This commit is contained in:
parent
17703310ae
commit
1d7c86bf0d
13 changed files with 120 additions and 200 deletions
|
@ -1014,12 +1014,10 @@ impl SerializableItem for Editor {
|
|||
fn cleanup(
|
||||
workspace_id: WorkspaceId,
|
||||
alive_items: Vec<ItemId>,
|
||||
window: &mut Window,
|
||||
_window: &mut Window,
|
||||
cx: &mut App,
|
||||
) -> Task<Result<()>> {
|
||||
window.spawn(cx, async move |_| {
|
||||
DB.delete_unloaded_items(workspace_id, alive_items).await
|
||||
})
|
||||
workspace::delete_unloaded_items(alive_items, workspace_id, "editors", &DB, cx)
|
||||
}
|
||||
|
||||
fn deserialize(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue