@@ -11,22 +11,22 @@ fn main() {
11
11
12
12
match matches. subcommand ( ) {
13
13
Some ( ( "bless" , matches) ) => {
14
- bless:: bless ( matches. contains_id ( "ignore-timestamp" ) ) ;
14
+ bless:: bless ( matches. get_flag ( "ignore-timestamp" ) ) ;
15
15
} ,
16
16
Some ( ( "dogfood" , matches) ) => {
17
17
dogfood:: dogfood (
18
- matches. contains_id ( "fix" ) ,
19
- matches. contains_id ( "allow-dirty" ) ,
20
- matches. contains_id ( "allow-staged" ) ,
18
+ matches. get_flag ( "fix" ) ,
19
+ matches. get_flag ( "allow-dirty" ) ,
20
+ matches. get_flag ( "allow-staged" ) ,
21
21
) ;
22
22
} ,
23
23
Some ( ( "fmt" , matches) ) => {
24
- fmt:: run ( matches. contains_id ( "check" ) , matches. contains_id ( "verbose" ) ) ;
24
+ fmt:: run ( matches. get_flag ( "check" ) , matches. get_flag ( "verbose" ) ) ;
25
25
} ,
26
26
Some ( ( "update_lints" , matches) ) => {
27
- if matches. contains_id ( "print-only" ) {
27
+ if matches. get_flag ( "print-only" ) {
28
28
update_lints:: print_lints ( ) ;
29
- } else if matches. contains_id ( "check" ) {
29
+ } else if matches. get_flag ( "check" ) {
30
30
update_lints:: update ( update_lints:: UpdateMode :: Check ) ;
31
31
} else {
32
32
update_lints:: update ( update_lints:: UpdateMode :: Change ) ;
@@ -38,15 +38,15 @@ fn main() {
38
38
matches. get_one :: < String > ( "name" ) ,
39
39
matches. get_one :: < String > ( "category" ) . map ( String :: as_str) ,
40
40
matches. get_one :: < String > ( "type" ) . map ( String :: as_str) ,
41
- matches. contains_id ( "msrv" ) ,
41
+ matches. get_flag ( "msrv" ) ,
42
42
) {
43
43
Ok ( _) => update_lints:: update ( update_lints:: UpdateMode :: Change ) ,
44
44
Err ( e) => eprintln ! ( "Unable to create lint: {e}" ) ,
45
45
}
46
46
} ,
47
47
Some ( ( "setup" , sub_command) ) => match sub_command. subcommand ( ) {
48
48
Some ( ( "intellij" , matches) ) => {
49
- if matches. contains_id ( "remove" ) {
49
+ if matches. get_flag ( "remove" ) {
50
50
setup:: intellij:: remove_rustc_src ( ) ;
51
51
} else {
52
52
setup:: intellij:: setup_rustc_src (
@@ -57,17 +57,17 @@ fn main() {
57
57
}
58
58
} ,
59
59
Some ( ( "git-hook" , matches) ) => {
60
- if matches. contains_id ( "remove" ) {
60
+ if matches. get_flag ( "remove" ) {
61
61
setup:: git_hook:: remove_hook ( ) ;
62
62
} else {
63
- setup:: git_hook:: install_hook ( matches. contains_id ( "force-override" ) ) ;
63
+ setup:: git_hook:: install_hook ( matches. get_flag ( "force-override" ) ) ;
64
64
}
65
65
} ,
66
66
Some ( ( "vscode-tasks" , matches) ) => {
67
- if matches. contains_id ( "remove" ) {
67
+ if matches. get_flag ( "remove" ) {
68
68
setup:: vscode:: remove_tasks ( ) ;
69
69
} else {
70
- setup:: vscode:: install_tasks ( matches. contains_id ( "force-override" ) ) ;
70
+ setup:: vscode:: install_tasks ( matches. get_flag ( "force-override" ) ) ;
71
71
}
72
72
} ,
73
73
_ => { } ,
@@ -91,7 +91,7 @@ fn main() {
91
91
Some ( ( "rename_lint" , matches) ) => {
92
92
let old_name = matches. get_one :: < String > ( "old_name" ) . unwrap ( ) ;
93
93
let new_name = matches. get_one :: < String > ( "new_name" ) . unwrap_or ( old_name) ;
94
- let uplift = matches. contains_id ( "uplift" ) ;
94
+ let uplift = matches. get_flag ( "uplift" ) ;
95
95
update_lints:: rename ( old_name, new_name, uplift) ;
96
96
} ,
97
97
Some ( ( "deprecate" , matches) ) => {
0 commit comments