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
@@ -55,7 +55,7 @@ impl ManifestProvider for PyprojectTomlManifestProvider {
|
||||
}: ManifestQuery,
|
||||
) -> Option<Arc<RelPath>> {
|
||||
for path in path.ancestors().take(depth) {
|
||||
let p = path.join(RelPath::new("pyproject.toml").unwrap());
|
||||
let p = path.join(RelPath::unix("pyproject.toml").unwrap());
|
||||
if delegate.exists(&p, Some(false)) {
|
||||
return Some(path.into());
|
||||
}
|
||||
@@ -1030,7 +1030,7 @@ impl ToolchainLister for PythonToolchainProvider {
|
||||
config.workspace_directories = Some(
|
||||
subroot_relative_path
|
||||
.ancestors()
|
||||
.map(|ancestor| worktree_root.join(ancestor))
|
||||
.map(|ancestor| worktree_root.join(ancestor.as_std_path()))
|
||||
.collect(),
|
||||
);
|
||||
for locator in locators.iter() {
|
||||
|
||||
Reference in New Issue
Block a user