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:
Behrang Saeedzadeh 2025-08-12 11:04:31 +03:30
parent c55072977a
commit 73cee2c88a
No known key found for this signature in database
GPG key ID: B4CF0E465DC40E7B

View file

@ -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