@@ -13,7 +13,6 @@ pub struct DocBuilderOptions {
1313 pub chroot_user : String ,
1414 pub container_name : String ,
1515 pub crates_io_index_path : PathBuf ,
16- pub sources_path : PathBuf ,
1716 pub skip_if_exists : bool ,
1817 pub skip_if_log_exists : bool ,
1918 pub skip_oldest_versions : bool ,
@@ -28,15 +27,14 @@ impl Default for DocBuilderOptions {
2827
2928 let cwd = env:: current_dir ( ) . unwrap ( ) ;
3029
31- let ( prefix, destination, chroot_path, crates_io_index_path, sources_path ) =
30+ let ( prefix, destination, chroot_path, crates_io_index_path) =
3231 generate_paths ( cwd) ;
3332
3433 DocBuilderOptions {
3534 prefix : prefix,
3635 destination : destination,
3736 chroot_path : chroot_path,
3837 crates_io_index_path : crates_io_index_path,
39- sources_path : sources_path,
4038
4139 chroot_user : "cratesfyi" . to_string ( ) ,
4240 container_name : "cratesfyi-container" . to_string ( ) ,
@@ -57,13 +55,12 @@ impl fmt::Debug for DocBuilderOptions {
5755 write ! ( f,
5856 "DocBuilderOptions {{ destination: {:?}, chroot_path: {:?}, \
5957 crates_io_index_path: {:?}, \
60- sources_path: {:?}, container_name: {:?}, chroot_user: {:?}, \
58+ container_name: {:?}, chroot_user: {:?}, \
6159 keep_build_directory: {:?}, skip_if_exists: {:?}, \
6260 skip_if_log_exists: {:?}, debug: {:?} }}",
6361 self . destination,
6462 self . chroot_path,
6563 self . crates_io_index_path,
66- self . sources_path,
6764 self . container_name,
6865 self . chroot_user,
6966 self . keep_build_directory,
@@ -77,14 +74,13 @@ impl fmt::Debug for DocBuilderOptions {
7774impl DocBuilderOptions {
7875 /// Creates new DocBuilderOptions from prefix
7976 pub fn from_prefix ( prefix : PathBuf ) -> DocBuilderOptions {
80- let ( prefix, destination, chroot_path, crates_io_index_path, sources_path ) =
77+ let ( prefix, destination, chroot_path, crates_io_index_path) =
8178 generate_paths ( prefix) ;
8279 DocBuilderOptions {
8380 prefix : prefix,
8481 destination : destination,
8582 chroot_path : chroot_path,
8683 crates_io_index_path : crates_io_index_path,
87- sources_path : sources_path,
8884
8985 ..Default :: default ( )
9086 }
@@ -101,21 +97,17 @@ impl DocBuilderOptions {
10197 if !self . crates_io_index_path . exists ( ) {
10298 bail ! ( "crates.io-index path '{}' does not exist" , self . crates_io_index_path. display( ) ) ;
10399 }
104- if !self . sources_path . exists ( ) {
105- bail ! ( "sources path '{}' does not exist" , self . sources_path. display( ) ) ;
106- }
107100 Ok ( ( ) )
108101 }
109102}
110103
111104
112105
113- fn generate_paths ( prefix : PathBuf ) -> ( PathBuf , PathBuf , PathBuf , PathBuf , PathBuf ) {
106+ fn generate_paths ( prefix : PathBuf ) -> ( PathBuf , PathBuf , PathBuf , PathBuf ) {
114107
115108 let destination = PathBuf :: from ( & prefix) . join ( "documentations" ) ;
116109 let chroot_path = PathBuf :: from ( & prefix) . join ( "cratesfyi-container/rootfs" ) ;
117110 let crates_io_index_path = PathBuf :: from ( & prefix) . join ( "crates.io-index" ) ;
118- let sources_path = PathBuf :: from ( & prefix) . join ( "sources" ) ;
119111
120- ( prefix, destination, chroot_path, crates_io_index_path, sources_path )
112+ ( prefix, destination, chroot_path, crates_io_index_path)
121113}
0 commit comments