@@ -13,7 +13,6 @@ pub struct DocBuilderOptions {
13
13
pub chroot_user : String ,
14
14
pub container_name : String ,
15
15
pub crates_io_index_path : PathBuf ,
16
- pub sources_path : PathBuf ,
17
16
pub skip_if_exists : bool ,
18
17
pub skip_if_log_exists : bool ,
19
18
pub skip_oldest_versions : bool ,
@@ -28,15 +27,14 @@ impl Default for DocBuilderOptions {
28
27
29
28
let cwd = env:: current_dir ( ) . unwrap ( ) ;
30
29
31
- let ( prefix, destination, chroot_path, crates_io_index_path, sources_path ) =
30
+ let ( prefix, destination, chroot_path, crates_io_index_path) =
32
31
generate_paths ( cwd) ;
33
32
34
33
DocBuilderOptions {
35
34
prefix : prefix,
36
35
destination : destination,
37
36
chroot_path : chroot_path,
38
37
crates_io_index_path : crates_io_index_path,
39
- sources_path : sources_path,
40
38
41
39
chroot_user : "cratesfyi" . to_string ( ) ,
42
40
container_name : "cratesfyi-container" . to_string ( ) ,
@@ -57,13 +55,12 @@ impl fmt::Debug for DocBuilderOptions {
57
55
write ! ( f,
58
56
"DocBuilderOptions {{ destination: {:?}, chroot_path: {:?}, \
59
57
crates_io_index_path: {:?}, \
60
- sources_path: {:?}, container_name: {:?}, chroot_user: {:?}, \
58
+ container_name: {:?}, chroot_user: {:?}, \
61
59
keep_build_directory: {:?}, skip_if_exists: {:?}, \
62
60
skip_if_log_exists: {:?}, debug: {:?} }}",
63
61
self . destination,
64
62
self . chroot_path,
65
63
self . crates_io_index_path,
66
- self . sources_path,
67
64
self . container_name,
68
65
self . chroot_user,
69
66
self . keep_build_directory,
@@ -77,14 +74,13 @@ impl fmt::Debug for DocBuilderOptions {
77
74
impl DocBuilderOptions {
78
75
/// Creates new DocBuilderOptions from prefix
79
76
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) =
81
78
generate_paths ( prefix) ;
82
79
DocBuilderOptions {
83
80
prefix : prefix,
84
81
destination : destination,
85
82
chroot_path : chroot_path,
86
83
crates_io_index_path : crates_io_index_path,
87
- sources_path : sources_path,
88
84
89
85
..Default :: default ( )
90
86
}
@@ -101,21 +97,17 @@ impl DocBuilderOptions {
101
97
if !self . crates_io_index_path . exists ( ) {
102
98
bail ! ( "crates.io-index path '{}' does not exist" , self . crates_io_index_path. display( ) ) ;
103
99
}
104
- if !self . sources_path . exists ( ) {
105
- bail ! ( "sources path '{}' does not exist" , self . sources_path. display( ) ) ;
106
- }
107
100
Ok ( ( ) )
108
101
}
109
102
}
110
103
111
104
112
105
113
- fn generate_paths ( prefix : PathBuf ) -> ( PathBuf , PathBuf , PathBuf , PathBuf , PathBuf ) {
106
+ fn generate_paths ( prefix : PathBuf ) -> ( PathBuf , PathBuf , PathBuf , PathBuf ) {
114
107
115
108
let destination = PathBuf :: from ( & prefix) . join ( "documentations" ) ;
116
109
let chroot_path = PathBuf :: from ( & prefix) . join ( "cratesfyi-container/rootfs" ) ;
117
110
let crates_io_index_path = PathBuf :: from ( & prefix) . join ( "crates.io-index" ) ;
118
- let sources_path = PathBuf :: from ( & prefix) . join ( "sources" ) ;
119
111
120
- ( prefix, destination, chroot_path, crates_io_index_path, sources_path )
112
+ ( prefix, destination, chroot_path, crates_io_index_path)
121
113
}
0 commit comments