File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,19 +125,19 @@ fn test_bool() {
125125 assert_eq ! ( result. unwrap_err( ) . kind( ) , ErrorKind :: NoEquals ) ;
126126}
127127
128- fn parse_hex ( input : & str ) -> Result < u64 , ParseIntError > {
129- u64:: from_str_radix ( input, 16 )
130- }
131-
132- #[ derive( Parser , PartialEq , Debug ) ]
133- struct HexOpt {
134- #[ arg( short, value_parser = parse_hex) ]
135- number : u64 ,
136- }
137-
138128#[ test]
139129#[ cfg( feature = "error-context" ) ]
140130fn test_parse_hex_function_path ( ) {
131+ #[ derive( Parser , PartialEq , Debug ) ]
132+ struct HexOpt {
133+ #[ arg( short, value_parser = parse_hex) ]
134+ number : u64 ,
135+ }
136+
137+ fn parse_hex ( input : & str ) -> Result < u64 , ParseIntError > {
138+ u64:: from_str_radix ( input, 16 )
139+ }
140+
141141 assert_eq ! (
142142 HexOpt { number: 5 } ,
143143 HexOpt :: try_parse_from( [ "test" , "-n" , "5" ] ) . unwrap( )
You can’t perform that action at this time.
0 commit comments