WIP - Maintain a set of open buffers on a LocalWorktree

This commit is contained in:
Max Brunsfeld
2021-06-22 12:29:58 -07:00
parent a364839e93
commit dc8e216fcb
7 changed files with 225 additions and 154 deletions
+14
View File
@@ -2245,6 +2245,20 @@ impl<T: Entity> WeakModelHandle<T> {
}
}
impl<T> Hash for WeakModelHandle<T> {
fn hash<H: Hasher>(&self, state: &mut H) {
self.model_id.hash(state)
}
}
impl<T> PartialEq for WeakModelHandle<T> {
fn eq(&self, other: &Self) -> bool {
self.model_id == other.model_id
}
}
impl<T> Eq for WeakModelHandle<T> {}
impl<T> Clone for WeakModelHandle<T> {
fn clone(&self) -> Self {
Self {