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
+5 -4
View File
@@ -633,7 +633,7 @@ impl SettingsStore {
return Err(InvalidSettingsError::Tasks {
message: "Attempted to submit tasks into the settings store".to_string(),
path: directory_path
.join(RelPath::new(task_file_name()).unwrap())
.join(RelPath::unix(task_file_name()).unwrap())
.as_std_path()
.to_path_buf(),
});
@@ -643,7 +643,7 @@ impl SettingsStore {
message: "Attempted to submit debugger config into the settings store"
.to_string(),
path: directory_path
.join(RelPath::new(task_file_name()).unwrap())
.join(RelPath::unix(task_file_name()).unwrap())
.as_std_path()
.to_path_buf(),
});
@@ -698,7 +698,8 @@ impl SettingsStore {
v.insert((editorconfig_contents.to_owned(), None));
return Err(InvalidSettingsError::Editorconfig {
message: e.to_string(),
path: directory_path.join(RelPath::new(EDITORCONFIG_NAME).unwrap()),
path: directory_path
.join(RelPath::unix(EDITORCONFIG_NAME).unwrap()),
});
}
},
@@ -716,7 +717,7 @@ impl SettingsStore {
return Err(InvalidSettingsError::Editorconfig {
message: e.to_string(),
path: directory_path
.join(RelPath::new(EDITORCONFIG_NAME).unwrap()),
.join(RelPath::unix(EDITORCONFIG_NAME).unwrap()),
});
}
}