File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -250,24 +250,7 @@ fn usage(program: &String) {
250250fn entry ( ) -> Result < ( ) , ( ) > {
251251 let mut args = env:: args ( ) ;
252252 let program = args. next ( ) . expect ( "path to program is provided" ) ;
253- let cloned_args: Vec < String > = env:: args ( ) . skip ( 1 ) . collect :: < Vec < String > > ( ) ;
254-
255- let mut subcommand = None ;
256-
257- for arg in cloned_args {
258- match arg. as_str ( ) {
259- "--sqlite" => {
260- eprintln ! ( "{}: 'SQLITE' mode is depracated. Remove '--sqlite' flag." , "ERROR" . red( ) . bold( ) ) ;
261- exit ( -1 ) ;
262- }
263- _ => {
264- subcommand = Some ( arg) ;
265- break
266- }
267- }
268- }
269-
270- let subcommand = subcommand. ok_or_else ( || {
253+ let subcommand = args. next ( ) . ok_or_else ( || {
271254 usage ( & program) ;
272255 eprintln ! ( "{}: no subcommand is provided" , "ERROR" . red( ) . bold( ) ) ;
273256 } ) ?;
You can’t perform that action at this time.
0 commit comments