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
@@ -67,7 +67,7 @@ impl Example for AddArgToTraitMethod {
for tool_name in add_ignored_window_paths {
let path_str = format!("crates/assistant_tools/src/{}.rs", tool_name);
let edits = edits.get(RelPath::new(&path_str).unwrap());
let edits = edits.get(RelPath::unix(&path_str).unwrap());
let ignored = edits.is_some_and(|edits| {
edits.has_added_line(" _window: Option<gpui::AnyWindowHandle>,\n")
@@ -86,7 +86,7 @@ impl Example for AddArgToTraitMethod {
// Adds unignored argument to `batch_tool`
let batch_tool_edits =
edits.get(RelPath::new("crates/assistant_tools/src/batch_tool.rs").unwrap());
edits.get(RelPath::unix("crates/assistant_tools/src/batch_tool.rs").unwrap());
cx.assert(
batch_tool_edits.is_some_and(|edits| {