File tree 3 files changed +4
-7
lines changed 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
- use crate :: path:: { Dirs , RelPath } ;
1
+ use crate :: path:: Dirs ;
2
2
use crate :: prepare:: GitRepo ;
3
3
use crate :: utils:: { CargoProject , Compiler , spawn_and_wait} ;
4
4
use crate :: { CodegenBackend , SysrootKind , build_sysroot} ;
@@ -20,7 +20,7 @@ pub(crate) fn run(
20
20
rustup_toolchain_name : Option < & str > ,
21
21
bootstrap_host_compiler : & Compiler ,
22
22
) {
23
- RelPath :: DOWNLOAD . ensure_exists ( dirs) ;
23
+ std :: fs :: create_dir_all ( & dirs. download_dir ) . unwrap ( ) ;
24
24
ABI_CAFE_REPO . fetch ( dirs) ;
25
25
ABI_CAFE_REPO . patch ( dirs) ;
26
26
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ pub(crate) struct Dirs {
14
14
#[ derive( Debug , Copy , Clone ) ]
15
15
pub ( crate ) enum PathBase {
16
16
Source ,
17
- Download ,
18
17
Build ,
19
18
Dist ,
20
19
}
@@ -23,7 +22,6 @@ impl PathBase {
23
22
fn to_path ( self , dirs : & Dirs ) -> PathBuf {
24
23
match self {
25
24
PathBase :: Source => dirs. source_dir . clone ( ) ,
26
- PathBase :: Download => dirs. download_dir . clone ( ) ,
27
25
PathBase :: Build => dirs. build_dir . clone ( ) ,
28
26
PathBase :: Dist => dirs. dist_dir . clone ( ) ,
29
27
}
@@ -38,7 +36,6 @@ pub(crate) enum RelPath {
38
36
39
37
impl RelPath {
40
38
pub ( crate ) const SOURCE : RelPath = RelPath :: Base ( PathBase :: Source ) ;
41
- pub ( crate ) const DOWNLOAD : RelPath = RelPath :: Base ( PathBase :: Download ) ;
42
39
pub ( crate ) const BUILD : RelPath = RelPath :: Base ( PathBase :: Build ) ;
43
40
pub ( crate ) const DIST : RelPath = RelPath :: Base ( PathBase :: Dist ) ;
44
41
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use crate::path::{Dirs, RelPath};
8
8
use crate :: utils:: { copy_dir_recursively, ensure_empty_dir, spawn_and_wait} ;
9
9
10
10
pub ( crate ) fn prepare ( dirs : & Dirs ) {
11
- RelPath :: DOWNLOAD . ensure_exists ( dirs) ;
11
+ std :: fs :: create_dir_all ( & dirs. download_dir ) . unwrap ( ) ;
12
12
crate :: tests:: RAND_REPO . fetch ( dirs) ;
13
13
crate :: tests:: REGEX_REPO . fetch ( dirs) ;
14
14
}
@@ -79,7 +79,7 @@ impl GitRepo {
79
79
80
80
fn download_dir ( & self , dirs : & Dirs ) -> PathBuf {
81
81
match self . url {
82
- GitRepoUrl :: Github { user : _, repo } => RelPath :: DOWNLOAD . join ( repo) . to_path ( dirs ) ,
82
+ GitRepoUrl :: Github { user : _, repo } => dirs . download_dir . join ( repo) ,
83
83
}
84
84
}
85
85
You can’t perform that action at this time.
0 commit comments