File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11fn main ( ) -> lexarg:: Result < ( ) > {
22 use lexarg:: prelude:: * ;
33
4- let mut test_opts = libtest_lexarg:: TestOptsParseState :: new ( ) ;
4+ let mut test_opts = libtest_lexarg:: TestOptsBuilder :: new ( ) ;
55
66 let raw = std:: env:: args_os ( ) . collect :: < Vec < _ > > ( ) ;
77 let mut parser = lexarg:: Parser :: new ( & raw ) ;
Original file line number Diff line number Diff line change 11//! libtest-compatible argument parser
22//!
3- //! This does not drive parsing but provides [`TestOptsParseState `] to plug into the parsing,
3+ //! This does not drive parsing but provides [`TestOptsBuilder `] to plug into the parsing,
44//! allowing additional parsers to be integrated.
55//!
66//! ## Example
@@ -18,7 +18,7 @@ use lexarg_error::ErrorContext;
1818
1919/// Parsed command-line options
2020///
21- /// To parse, see [`TestOptsParseState `]
21+ /// To parse, see [`TestOptsBuilder `]
2222#[ derive( Debug , Default ) ]
2323pub struct TestOpts {
2424 pub list : bool ,
@@ -288,17 +288,17 @@ Test Attributes:
288288
289289/// Intermediate CLI parser state for [`TestOpts`]
290290///
291- /// See [`TestOptsParseState ::parse_next`]
291+ /// See [`TestOptsBuilder ::parse_next`]
292292#[ derive( Debug , Default ) ]
293- pub struct TestOptsParseState {
293+ pub struct TestOptsBuilder {
294294 opts : TestOpts ,
295295 quiet : bool ,
296296 format : Option < OutputFormat > ,
297297 include_ignored : bool ,
298298 ignored : bool ,
299299}
300300
301- impl TestOptsParseState {
301+ impl TestOptsBuilder {
302302 pub fn new ( ) -> Self {
303303 Default :: default ( )
304304 }
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ const ERROR_EXIT_CODE: i32 = 101;
7373fn parse < ' p > (
7474 parser : & mut cli:: Parser < ' p > ,
7575) -> Result < libtest_lexarg:: TestOpts , cli:: ErrorContext < ' p > > {
76- let mut test_opts = libtest_lexarg:: TestOptsParseState :: new ( ) ;
76+ let mut test_opts = libtest_lexarg:: TestOptsBuilder :: new ( ) ;
7777
7878 let bin = parser
7979 . next_raw ( )
You can’t perform that action at this time.
0 commit comments