persistence: More error contexts (#40787)

Release Notes:

- N/A *or* Added/Fixed/Improved ...

Co-authored-by: David Kleingeld <davidsk@zed.dev>
This commit is contained in:
Lukas Wirth
2025-10-21 11:29:43 +00:00
committed by GitHub
co-authored by David Kleingeld
parent 3d4abde55a
commit 0be70e24d6
4 changed files with 23 additions and 10 deletions
+3 -3
View File
@@ -1706,9 +1706,9 @@ impl LocalWorktree {
refresh.recv().await;
log::trace!("refreshed entry {path:?} in {:?}", t0.elapsed());
let new_entry = this.read_with(cx, |this, _| {
this.entry_for_path(&path)
.cloned()
.context("reading path after update")
this.entry_for_path(&path).cloned().with_context(|| {
format!("Could not find entry in worktree for {path:?} after refresh")
})
})??;
Ok(Some(new_entry))
})