Clean up RelPath API (#38912)

Consolidate constructors and accessors.

Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <cole@zed.dev>
This commit is contained in:
Max Brunsfeld
2025-09-25 14:42:32 -07:00
committed by GitHub
co-authored by Cole Miller
parent 301e976465
commit 495a7b0a84
70 changed files with 483 additions and 408 deletions
+2 -3
View File
@@ -344,11 +344,10 @@ impl MarksState {
.worktrees(cx)
.filter_map(|worktree| {
let relative = path.strip_prefix(worktree.read(cx).abs_path()).ok()?;
let path = RelPath::from_std_path(relative, worktree.read(cx).path_style())
.log_err()?;
let path = RelPath::new(relative, worktree.read(cx).path_style()).log_err()?;
Some(ProjectPath {
worktree_id: worktree.read(cx).id(),
path,
path: path.into_arc(),
})
})
.next();