working copy: rename working_copy_path() to just path()

It seems pretty clear from the context. Turns out we only use the
function in a test case. Maybe we don't even need it. It's easy to
provide it, though.
This commit is contained in:
Martin von Zweigbergk 2023-10-12 14:36:16 -07:00 committed by Martin von Zweigbergk
parent 9e43207911
commit 0aa5f1ae10
3 changed files with 3 additions and 3 deletions

View file

@ -1387,7 +1387,7 @@ impl WorkingCopy for LocalWorkingCopy {
"local"
}
fn working_copy_path(&self) -> &Path {
fn path(&self) -> &Path {
&self.working_copy_path
}

View file

@ -30,7 +30,7 @@ pub trait WorkingCopy {
fn name(&self) -> &str;
/// The working copy's root directory.
fn working_copy_path(&self) -> &Path;
fn path(&self) -> &Path;
/// The working copy's workspace ID.
fn workspace_id(&self) -> &WorkspaceId;

View file

@ -88,7 +88,7 @@ fn test_sparse_checkout() {
// Reload the state to check that it was persisted
let mut wc = LocalWorkingCopy::load(
repo.store().clone(),
wc.working_copy_path().to_path_buf(),
wc.path().to_path_buf(),
wc.state_path().to_path_buf(),
);
assert_eq!(