Skip to content

Commit

Permalink
working copy: rename working_copy_path() to just path()
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
martinvonz committed Oct 12, 2023
1 parent 9e43207 commit 0aa5f1a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/src/local_working_copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ impl WorkingCopy for LocalWorkingCopy {
"local"
}

fn working_copy_path(&self) -> &Path {
fn path(&self) -> &Path {
&self.working_copy_path
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/working_copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/tests/test_local_working_copy_sparse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down

0 comments on commit 0aa5f1a

Please sign in to comment.