Skip to content

Commit a8712ea

Browse files
committed
Remove RelPath::source
1 parent bbdbaec commit a8712ea

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

build_system/path.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@ pub(crate) struct Dirs {
1616
#[derive(Debug, Copy, Clone)]
1717
pub(crate) enum PathBase {
1818
Source,
19-
Download,
2019
Build,
2120
}
2221

2322
impl PathBase {
2423
fn to_path(self, dirs: &Dirs) -> PathBuf {
2524
match self {
2625
PathBase::Source => dirs.source_dir.clone(),
27-
PathBase::Download => dirs.download_dir.clone(),
2826
PathBase::Build => dirs.build_dir.clone(),
2927
}
3028
}
@@ -41,10 +39,6 @@ impl RelPath {
4139
RelPath { base: PathBase::Source, suffix }
4240
}
4341

44-
pub(crate) const fn download(suffix: &'static str) -> RelPath {
45-
RelPath { base: PathBase::Download, suffix }
46-
}
47-
4842
pub(crate) const fn build(suffix: &'static str) -> RelPath {
4943
RelPath { base: PathBase::Build, suffix }
5044
}

build_system/prepare.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl GitRepo {
7979

8080
fn download_dir(&self, dirs: &Dirs) -> PathBuf {
8181
match self.url {
82-
GitRepoUrl::Github { user: _, repo } => RelPath::download(repo).to_path(dirs),
82+
GitRepoUrl::Github { user: _, repo } => dirs.download_dir.join(repo),
8383
}
8484
}
8585

0 commit comments

Comments
 (0)