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 33use std:: { env, fmt} ;
44use std:: path:: PathBuf ;
55use error:: Result ;
6- use failure:: err_msg;
76
87#[ derive( Clone ) ]
98pub struct DocBuilderOptions {
@@ -94,16 +93,16 @@ impl DocBuilderOptions {
9493
9594 pub fn check_paths ( & self ) -> Result < ( ) > {
9695 if !self . destination . exists ( ) {
97- return Err ( err_msg ( "Destination path not exists" ) ) ;
96+ bail ! ( "destination path '{}' does not exist" , self . destination . display ( ) ) ;
9897 }
9998 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 ( ) ) ;
101100 }
102101 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 ( ) ) ;
104103 }
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 ( ) ) ;
107106 }
108107 Ok ( ( ) )
109108 }
You can’t perform that action at this time.
0 commit comments