Remove ReadView and UpdateView traits

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2023-04-24 17:36:14 +02:00
parent a6115d9330
commit c165fb9be5
12 changed files with 160 additions and 183 deletions

View file

@ -981,7 +981,7 @@ impl Pane {
// was started.
let (item_ix, mut project_item_ids) = pane.read_with(&cx, |pane, cx| {
(pane.index_for_item(&*item), item.project_item_model_ids(cx))
});
})?;
let item_ix = if let Some(ix) = item_ix {
ix
} else {
@ -1001,7 +1001,7 @@ impl Pane {
project_item_ids.retain(|id| !other_project_item_ids.contains(id));
}
}
});
})?;
let should_save = project_item_ids
.iter()
.any(|id| saved_project_items_ids.insert(*id));