@@ -37,9 +37,6 @@ struct Args {
37
37
/// show the executable version
38
38
#[ argh( switch, short = 'v' ) ]
39
39
version : bool ,
40
- /// show hints on success
41
- #[ argh( switch) ]
42
- success_hints : bool ,
43
40
#[ argh( subcommand) ]
44
41
nested : Option < Subcommands > ,
45
42
}
@@ -64,7 +61,11 @@ struct VerifyArgs {}
64
61
#[ derive( FromArgs , PartialEq , Debug ) ]
65
62
#[ argh( subcommand, name = "watch" ) ]
66
63
/// Reruns `verify` when files were edited
67
- struct WatchArgs { }
64
+ struct WatchArgs {
65
+ /// show hints on success
66
+ #[ argh( switch) ]
67
+ success_hints : bool ,
68
+ }
68
69
69
70
#[ derive( FromArgs , PartialEq , Debug ) ]
70
71
#[ argh( subcommand, name = "run" ) ]
@@ -151,7 +152,6 @@ fn main() {
151
152
let toml_str = & fs:: read_to_string ( "info.toml" ) . unwrap ( ) ;
152
153
let exercises = toml:: from_str :: < ExerciseList > ( toml_str) . unwrap ( ) . exercises ;
153
154
let verbose = args. nocapture ;
154
- let success_hints = args. success_hints ;
155
155
156
156
let command = args. nested . unwrap_or_else ( || {
157
157
println ! ( "{DEFAULT_OUT}\n " ) ;
@@ -233,7 +233,7 @@ fn main() {
233
233
}
234
234
235
235
Subcommands :: Verify ( _subargs) => {
236
- verify ( & exercises, ( 0 , exercises. len ( ) ) , verbose, success_hints )
236
+ verify ( & exercises, ( 0 , exercises. len ( ) ) , verbose, false )
237
237
. unwrap_or_else ( |_| std:: process:: exit ( 1 ) ) ;
238
238
}
239
239
@@ -256,7 +256,7 @@ fn main() {
256
256
}
257
257
}
258
258
259
- Subcommands :: Watch ( _subargs) => match watch ( & exercises, verbose, success_hints) {
259
+ Subcommands :: Watch ( _subargs) => match watch ( & exercises, verbose, _subargs . success_hints ) {
260
260
Err ( e) => {
261
261
println ! (
262
262
"Error: Could not watch your progress. Error message was {:?}." ,
0 commit comments