@@ -20,14 +20,16 @@ use lexarg_error::ErrorContext;
2020///
2121/// To parse, see [`TestOptsBuilder`]
2222#[ derive( Debug , Default ) ]
23+ #[ non_exhaustive]
2324pub struct TestOpts {
2425 pub list : bool ,
2526 pub filters : Vec < String > ,
2627 pub filter_exact : bool ,
2728 pub run_ignored : RunIgnored ,
2829 pub run_tests : bool ,
2930 pub bench_benchmarks : bool ,
30- pub nocapture : bool ,
31+ pub no_capture : bool ,
32+ pub show_output : bool ,
3133 pub color : ColorConfig ,
3234 pub format : OutputFormat ,
3335 pub test_threads : Option < std:: num:: NonZeroUsize > ,
@@ -36,7 +38,6 @@ pub struct TestOpts {
3638 /// May run a few more tests due to threading, but will
3739 /// abort as soon as possible.
3840 pub fail_fast : bool ,
39- pub options : Options ,
4041 pub allowed_unstable : Vec < String > ,
4142}
4243
@@ -86,16 +87,6 @@ impl Default for OutputFormat {
8687 }
8788}
8889
89- /// Options for the test run defined by the caller (instead of CLI arguments) (see
90- /// [`TestOpts::options`])
91- ///
92- /// In case we want to add other options as well, just add them in this struct.
93- #[ derive( Copy , Clone , Debug , Default ) ]
94- pub struct Options {
95- pub display_output : bool ,
96- pub panic_abort : bool ,
97- }
98-
9990pub const UNSTABLE_OPTIONS : & str = "unstable-options" ;
10091
10192pub const OPTIONS_HELP : & str = r#"
@@ -201,7 +192,7 @@ impl TestOptsBuilder {
201192 self . opts . list = true ;
202193 }
203194 Long ( "no-capture" ) => {
204- self . opts . nocapture = true ;
195+ self . opts . no_capture = true ;
205196 }
206197 Long ( "test-threads" ) => {
207198 let test_threads = parser
@@ -257,7 +248,7 @@ impl TestOptsBuilder {
257248 } ) ;
258249 }
259250 Long ( "show-output" ) => {
260- self . opts . options . display_output = true ;
251+ self . opts . show_output = true ;
261252 }
262253 Short ( "Z" ) => {
263254 let feature = parser
0 commit comments