@@ -58,27 +58,29 @@ fn main() -> std::io::Result<()> {
5858 . build_global ( )
5959 . unwrap ( ) ;
6060
61- let matches = clap:: App :: new ( "QL extractor" )
61+ let matches = clap:: Command :: new ( "QL extractor" )
6262 . version ( "1.0" )
6363 . author ( "GitHub" )
6464 . about ( "CodeQL QL extractor" )
65- . args_from_usage (
66- "-- source-archive-dir= <DIR> ' Sets a custom source archive folder'
67- -- output-dir= <DIR> ' Sets a custom trap folder'
68- -- file-list= <FILE_LIST> ' A text files containing the paths of the files to extract'" ,
69- )
65+ . args ( & [
66+ clap :: arg! ( -- " source-archive-dir" <DIR > " Sets a custom source archive folder" ) ,
67+ clap :: arg! ( -- " output-dir" <DIR > " Sets a custom trap folder" ) ,
68+ clap :: arg! ( -- " file-list" <FILE_LIST > " A text file containing the paths of the files to extract" ) ,
69+ ] )
7070 . get_matches ( ) ;
7171 let src_archive_dir = matches
72- . value_of ( "source-archive-dir" )
72+ . get_one :: < String > ( "source-archive-dir" )
7373 . expect ( "missing --source-archive-dir" ) ;
7474 let src_archive_dir = PathBuf :: from ( src_archive_dir) ;
7575
7676 let trap_dir = matches
77- . value_of ( "output-dir" )
77+ . get_one :: < String > ( "output-dir" )
7878 . expect ( "missing --output-dir" ) ;
7979 let trap_dir = PathBuf :: from ( trap_dir) ;
8080
81- let file_list = matches. value_of ( "file-list" ) . expect ( "missing --file-list" ) ;
81+ let file_list = matches
82+ . get_one :: < String > ( "file-list" )
83+ . expect ( "missing --file-list" ) ;
8284 let file_list = fs:: File :: open ( file_list) ?;
8385
8486 let language = tree_sitter_ql:: language ( ) ;
0 commit comments