Remove weak handles when worktree gets dropped
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
e5662dd426
commit
2fcf1aee6b
2 changed files with 20 additions and 10 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue