Remove weak handles when worktree gets dropped
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
co-authored by
Nathan Sobo
parent
e5662dd426
commit
2fcf1aee6b
@@ -267,6 +267,10 @@ impl Worktree {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_local(&self) -> bool {
|
||||
matches!(self, Worktree::Local(_))
|
||||
}
|
||||
|
||||
pub fn snapshot(&self) -> Snapshot {
|
||||
match self {
|
||||
Worktree::Local(worktree) => worktree.snapshot(),
|
||||
|
||||
Reference in New Issue
Block a user