File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 3
3
use std:: { env, fmt} ;
4
4
use std:: path:: PathBuf ;
5
5
use error:: Result ;
6
- use failure:: err_msg;
7
6
8
7
#[ derive( Clone ) ]
9
8
pub struct DocBuilderOptions {
@@ -94,16 +93,16 @@ impl DocBuilderOptions {
94
93
95
94
pub fn check_paths ( & self ) -> Result < ( ) > {
96
95
if !self . destination . exists ( ) {
97
- return Err ( err_msg ( "Destination path not exists" ) ) ;
96
+ bail ! ( "destination path '{}' does not exist" , self . destination . display ( ) ) ;
98
97
}
99
98
if !self . chroot_path . exists ( ) {
100
- return Err ( err_msg ( "Chroot path not exists" ) ) ;
99
+ bail ! ( "chroot path '{}' does not exist" , self . chroot_path . display ( ) ) ;
101
100
}
102
101
if !self . crates_io_index_path . exists ( ) {
103
- return Err ( err_msg ( "crates.io-index path not exists" ) ) ;
102
+ bail ! ( "crates.io-index path '{}' does not exist" , self . crates_io_index_path . display ( ) ) ;
104
103
}
105
- if !self . crates_io_index_path . exists ( ) {
106
- return Err ( err_msg ( "Logs path not exists" ) ) ;
104
+ if !self . sources_path . exists ( ) {
105
+ bail ! ( "sources path '{}' does not exist" , self . sources_path . display ( ) ) ;
107
106
}
108
107
Ok ( ( ) )
109
108
}
You can’t perform that action at this time.
0 commit comments