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
@@ -20905,7 +20905,10 @@ async fn test_display_diff_hunks(cx: &mut TestAppContext) {
|
||||
for buffer in &buffers {
|
||||
let snapshot = buffer.read(cx).snapshot();
|
||||
multibuffer.set_excerpts_for_path(
|
||||
PathKey::namespaced(0, buffer.read(cx).file().unwrap().path().as_str().into()),
|
||||
PathKey::namespaced(
|
||||
0,
|
||||
buffer.read(cx).file().unwrap().path().as_unix_str().into(),
|
||||
),
|
||||
buffer.clone(),
|
||||
vec![text::Anchor::MIN.to_point(&snapshot)..text::Anchor::MAX.to_point(&snapshot)],
|
||||
2,
|
||||
|
||||
@@ -296,7 +296,7 @@ impl EditorTestContext {
|
||||
let path = self.update_buffer(|buffer, _| buffer.file().unwrap().path().clone());
|
||||
fs.set_head_for_repo(
|
||||
&Self::root_path().join(".git"),
|
||||
&[(path.as_str(), diff_base.to_string())],
|
||||
&[(path.as_unix_str(), diff_base.to_string())],
|
||||
"deadbeef",
|
||||
);
|
||||
self.cx.run_until_parked();
|
||||
@@ -317,7 +317,7 @@ impl EditorTestContext {
|
||||
let path = self.update_buffer(|buffer, _| buffer.file().unwrap().path().clone());
|
||||
fs.set_index_for_repo(
|
||||
&Self::root_path().join(".git"),
|
||||
&[(path.as_str(), diff_base.to_string())],
|
||||
&[(path.as_unix_str(), diff_base.to_string())],
|
||||
);
|
||||
self.cx.run_until_parked();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user