File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -169,9 +169,9 @@ impl EnumValidateValue for PlainEnumValidator {
169
169
lookup : & LiteralLookup < PyObject > ,
170
170
strict : bool ,
171
171
) -> ValResult < Option < PyObject > > {
172
- match Ok ( lookup. validate ( py, input) ?. map ( | ( _ , v ) | v . clone_ref ( py ) ) ) {
173
- Ok ( Some ( validation_match ) ) => Ok ( Some ( validation_match ) ) ,
174
- Ok ( None ) => {
172
+ match lookup. validate ( py, input) ? {
173
+ Some ( ( _ , v ) ) => Ok ( Some ( v . clone_ref ( py ) ) ) ,
174
+ None => {
175
175
if !strict {
176
176
if let Some ( py_input) = input. as_python ( ) {
177
177
// necessary for compatibility with 2.6, where str and int subclasses are allowed
@@ -187,7 +187,6 @@ impl EnumValidateValue for PlainEnumValidator {
187
187
}
188
188
Ok ( None )
189
189
}
190
- Err ( val_err) => Err ( val_err) ,
191
190
}
192
191
}
193
192
}
You can’t perform that action at this time.
0 commit comments