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:
co-authored by
Cole Miller
parent
301e976465
commit
495a7b0a84
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user