File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Expand file tree Collapse file tree 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 ;
22use crate :: prepare:: GitRepo ;
33use crate :: utils:: { CargoProject , Compiler , spawn_and_wait} ;
44use crate :: { CodegenBackend , SysrootKind , build_sysroot} ;
@@ -20,7 +20,7 @@ pub(crate) fn run(
2020 rustup_toolchain_name : Option < & str > ,
2121 bootstrap_host_compiler : & Compiler ,
2222) {
23- RelPath :: DOWNLOAD . ensure_exists ( dirs) ;
23+ std :: fs :: create_dir_all ( & dirs. download_dir ) . unwrap ( ) ;
2424 ABI_CAFE_REPO . fetch ( dirs) ;
2525 ABI_CAFE_REPO . patch ( dirs) ;
2626
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ pub(crate) struct Dirs {
1414#[ derive( Debug , Copy , Clone ) ]
1515pub ( crate ) enum PathBase {
1616 Source ,
17- Download ,
1817 Build ,
1918 Dist ,
2019}
@@ -23,7 +22,6 @@ impl PathBase {
2322 fn to_path ( self , dirs : & Dirs ) -> PathBuf {
2423 match self {
2524 PathBase :: Source => dirs. source_dir . clone ( ) ,
26- PathBase :: Download => dirs. download_dir . clone ( ) ,
2725 PathBase :: Build => dirs. build_dir . clone ( ) ,
2826 PathBase :: Dist => dirs. dist_dir . clone ( ) ,
2927 }
@@ -38,7 +36,6 @@ pub(crate) enum RelPath {
3836
3937impl RelPath {
4038 pub ( crate ) const SOURCE : RelPath = RelPath :: Base ( PathBase :: Source ) ;
41- pub ( crate ) const DOWNLOAD : RelPath = RelPath :: Base ( PathBase :: Download ) ;
4239 pub ( crate ) const BUILD : RelPath = RelPath :: Base ( PathBase :: Build ) ;
4340 pub ( crate ) const DIST : RelPath = RelPath :: Base ( PathBase :: Dist ) ;
4441
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use crate::path::{Dirs, RelPath};
88use crate :: utils:: { copy_dir_recursively, ensure_empty_dir, spawn_and_wait} ;
99
1010pub ( crate ) fn prepare ( dirs : & Dirs ) {
11- RelPath :: DOWNLOAD . ensure_exists ( dirs) ;
11+ std :: fs :: create_dir_all ( & dirs. download_dir ) . unwrap ( ) ;
1212 crate :: tests:: RAND_REPO . fetch ( dirs) ;
1313 crate :: tests:: REGEX_REPO . fetch ( dirs) ;
1414}
@@ -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 . join ( repo) . to_path ( dirs ) ,
82+ GitRepoUrl :: Github { user : _, repo } => dirs . download_dir . join ( repo) ,
8383 }
8484 }
8585
You can’t perform that action at this time.
0 commit comments