Refactor opening workspace items
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
3cab32d201
commit
794d214eee
15 changed files with 281 additions and 257 deletions
|
@ -2773,6 +2773,10 @@ impl<T: Entity> WeakModelHandle<T> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn id(&self) -> usize {
|
||||
self.model_id
|
||||
}
|
||||
|
||||
pub fn upgrade(self, cx: &impl UpgradeModelHandle) -> Option<ModelHandle<T>> {
|
||||
cx.upgrade_model_handle(self)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue