Commit 45323f7 1 parent b08ca81 commit 45323f7 Copy full SHA for 45323f7
File tree 2 files changed +4
-8
lines changed
2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -95,16 +95,12 @@ impl Parse for EnumMeta {
95
95
} else if lookahead. peek ( kw:: parse_err_ty) {
96
96
let kw = input. parse :: < kw:: parse_err_ty > ( ) ?;
97
97
input. parse :: < Token ! [ =] > ( ) ?;
98
- let path_str: LitStr = input. parse ( ) ?;
99
- let path_tokens = parse_str ( & path_str. value ( ) ) ?;
100
- let path = parse2 ( path_tokens) ?;
98
+ let path: Path = input. parse ( ) ?;
101
99
Ok ( EnumMeta :: ParseErrTy { kw, path } )
102
100
} else if lookahead. peek ( kw:: parse_err_fn) {
103
101
let kw = input. parse :: < kw:: parse_err_fn > ( ) ?;
104
102
input. parse :: < Token ! [ =] > ( ) ?;
105
- let path_str: LitStr = input. parse ( ) ?;
106
- let path_tokens = parse_str ( & path_str. value ( ) ) ?;
107
- let path = parse2 ( path_tokens) ?;
103
+ let path: Path = input. parse ( ) ?;
108
104
Ok ( EnumMeta :: ParseErrFn { kw, path } )
109
105
} else if lookahead. peek ( kw:: const_into_str) {
110
106
Ok ( EnumMeta :: ConstIntoStr ( input. parse ( ) ?) )
Original file line number Diff line number Diff line change @@ -232,8 +232,8 @@ fn color_default_with_white() {
232
232
233
233
#[ derive( Debug , EnumString ) ]
234
234
#[ strum(
235
- parse_err_fn = " some_enum_not_found_err" ,
236
- parse_err_ty = " CaseCustomParseErrorNotFoundError"
235
+ parse_err_fn = some_enum_not_found_err,
236
+ parse_err_ty = CaseCustomParseErrorNotFoundError
237
237
) ]
238
238
enum CaseCustomParseErrorEnum {
239
239
#[ strum( serialize = "red" ) ]
You can’t perform that action at this time.
0 commit comments