File tree 3 files changed +6
-10
lines changed
3 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ fn show(c: &mut Criterion) {
11
11
command : Some ( Commands :: Show {
12
12
reference : "f4de01c0a12794d7b42a77b2138aa64119b90ea5" . into ( ) ,
13
13
} ) ,
14
- log : false ,
15
14
print : true ,
15
+ ..Default :: default ( )
16
16
} ,
17
17
& mut terminal,
18
18
)
Original file line number Diff line number Diff line change 1
1
use clap:: { Parser , Subcommand } ;
2
2
3
- #[ derive( Debug , Parser ) ]
3
+ #[ derive( Default , Debug , Parser ) ]
4
4
#[ command( name = crate :: APP_NAME ) ]
5
5
#[ command( flatten_help = true ) ]
6
6
pub struct Args {
7
7
#[ command( subcommand) ]
8
8
pub command : Option < Commands > ,
9
9
/// Print one frame and exit. Useful for debugging.
10
- #[ clap( long, action, default_value_t = false ) ]
10
+ #[ clap( long, action) ]
11
11
pub print : bool ,
12
12
/// Enable logging to 'gitu.log'
13
- #[ clap( long, action, default_value_t = false ) ]
13
+ #[ clap( long, action) ]
14
14
pub log : bool ,
15
15
16
- #[ clap( long, action, default_value_t = false ) ]
16
+ #[ clap( long, action) ]
17
17
/// Print version
18
18
pub version : bool ,
19
19
}
Original file line number Diff line number Diff line change @@ -75,11 +75,7 @@ impl TestContext {
75
75
let mut state = State :: create (
76
76
Repository :: open ( path) . unwrap ( ) ,
77
77
self . size ,
78
- & Args {
79
- command : None ,
80
- print : false ,
81
- log : false ,
82
- } ,
78
+ & Args :: default ( ) ,
83
79
config:: init_test_config ( ) . unwrap ( ) ,
84
80
)
85
81
. unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments