Skip to content

Commit 2d592c2

Browse files
committed
refactor(ws): Remove now-too-thin default_target_dir
1 parent 678f5c8 commit 2d592c2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/cargo/core/workspace.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -450,17 +450,13 @@ impl<'gctx> Workspace<'gctx> {
450450
pub fn target_dir(&self) -> Filesystem {
451451
self.target_dir
452452
.clone()
453-
.unwrap_or_else(|| self.default_target_dir())
453+
.unwrap_or_else(|| Filesystem::new(self.root().join("target")))
454454
}
455455

456456
pub fn build_dir(&self) -> Filesystem {
457457
self.build_dir.clone().unwrap_or_else(|| self.target_dir())
458458
}
459459

460-
fn default_target_dir(&self) -> Filesystem {
461-
Filesystem::new(self.root().join("target"))
462-
}
463-
464460
/// Returns the root `[replace]` section of this workspace.
465461
///
466462
/// This may be from a virtual crate or an actual crate.

0 commit comments

Comments
 (0)