Fix borrowing error in cleanup_repositories_for_worktree
Pass a reference to worktree_abs_path instead of moving it into the closure to resolve the ownership error in the filter_map operation.
This commit is contained in:
parent
c55072977a
commit
73cee2c88a
1 changed files with 1 additions and 1 deletions
|
@ -1296,7 +1296,7 @@ impl GitStore {
|
|||
.iter()
|
||||
.filter_map(|(repo_id, repo)| {
|
||||
let repo_work_dir = &repo.read(cx).work_directory_abs_path;
|
||||
if repo_work_dir.starts_with(worktree_abs_path) {
|
||||
if repo_work_dir.starts_with(&worktree_abs_path) {
|
||||
Some(*repo_id)
|
||||
} else {
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue