@@ -894,11 +894,12 @@ pub fn run(config: Config) -> Result<i32, String> {
894894 } ;
895895 let quiet = config. quiet ;
896896
897- match config. mode {
897+ let es = match config. mode {
898898 Mode :: Archive ( best_compression, split, input_paths, output_path) => {
899899 match output_path {
900900 Some ( p) => {
901- archive ( & paths, quiet, cpus, & password, false , best_compression, split, & input_paths, & p) ?;
901+ let es = archive ( & paths, quiet, cpus, & password, false , best_compression, split, & input_paths, & p) ?;
902+ es
902903 }
903904 None => {
904905 let current_dir = env:: current_dir ( ) . unwrap ( ) ;
@@ -907,25 +908,28 @@ pub fn run(config: Config) -> Result<i32, String> {
907908
908909 let output_path = Path :: join ( & current_dir, Path :: new ( & format ! ( "{}.rar" , input_path. file_name( ) . unwrap( ) . to_str( ) . unwrap( ) ) ) ) ;
909910
910- archive ( & paths, quiet, cpus, & password, false , best_compression, split, & input_paths, output_path. to_str ( ) . unwrap ( ) ) ?;
911+ let es = archive ( & paths, quiet, cpus, & password, false , best_compression, split, & input_paths, output_path. to_str ( ) . unwrap ( ) ) ?;
912+ es
911913 }
912914 }
913915 }
914916 Mode :: Extract ( input_path, output_path) => {
915917 match output_path {
916918 Some ( p) => {
917- extract ( & paths, quiet, cpus, & password, false , & input_path, & p) ?;
919+ let es = extract ( & paths, quiet, cpus, & password, false , & input_path, & p) ?;
920+ es
918921 }
919922 None => {
920923 let current_dir = env:: current_dir ( ) . unwrap ( ) ;
921924
922- extract ( & paths, quiet, cpus, & password, false , & input_path, current_dir. to_str ( ) . unwrap ( ) ) ?;
925+ let es = extract ( & paths, quiet, cpus, & password, false , & input_path, current_dir. to_str ( ) . unwrap ( ) ) ?;
926+ es
923927 }
924928 }
925929 }
926- }
930+ } ;
927931
928- Ok ( 0 )
932+ Ok ( es )
929933}
930934
931935// TODO -----Archive START-----
0 commit comments