File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,7 @@ enum CompressionMethod {
3030 Zstd ,
3131}
3232
33- fn main ( ) {
34- std:: process:: exit ( real_main ( ) ) ;
35- }
36-
37- fn real_main ( ) -> i32 {
33+ fn main ( ) -> ! {
3834 let args = Args :: parse ( ) ;
3935 let src_dir = & args. source ;
4036 let dst_file = & args. destination ;
@@ -70,11 +66,15 @@ fn real_main() -> i32 {
7066 } ,
7167 } ;
7268 match doit ( src_dir, dst_file, method) {
73- Ok ( _) => println ! ( "done: {src_dir:?} written to {dst_file:?}" ) ,
74- Err ( e) => eprintln ! ( "Error: {e:?}" ) ,
69+ Ok ( _) => {
70+ println ! ( "done: {src_dir:?} written to {dst_file:?}" ) ;
71+ std:: process:: exit ( 0 ) ;
72+ }
73+ Err ( e) => {
74+ eprintln ! ( "Error: {e:?}" ) ;
75+ std:: process:: abort ( ) ;
76+ }
7577 }
76-
77- 0
7878}
7979
8080fn zip_dir < T > (
Original file line number Diff line number Diff line change 11use afl:: fuzz;
22use std:: io:: { Read , Seek , SeekFrom } ;
33use tikv_jemallocator:: Jemalloc ;
4- use zip:: cfg_if;
54use zip:: read:: read_zipfile_from_stream;
65
76const MAX_BYTES_TO_READ : u64 = 1 << 24 ;
You can’t perform that action at this time.
0 commit comments