@@ -161,7 +161,7 @@ pub enum ErrorType {
161
161
// ---------------------
162
162
// enum errors
163
163
Enum {
164
- options : String ,
164
+ expected : String ,
165
165
} ,
166
166
// ---------------------
167
167
// dict errors
@@ -420,7 +420,7 @@ impl ErrorType {
420
420
Self :: IterationError { .. } => extract_context ! ( IterationError , ctx, error: String ) ,
421
421
Self :: StringTooShort { .. } => extract_context ! ( StringTooShort , ctx, min_length: usize ) ,
422
422
Self :: StringTooLong { .. } => extract_context ! ( StringTooLong , ctx, max_length: usize ) ,
423
- Self :: Enum { .. } => extract_context ! ( Enum , ctx, options : String ) ,
423
+ Self :: Enum { .. } => extract_context ! ( Enum , ctx, expected : String ) ,
424
424
Self :: StringPatternMismatch { .. } => extract_context ! ( StringPatternMismatch , ctx, pattern: String ) ,
425
425
Self :: MappingType { .. } => extract_context ! ( Cow :: Owned , MappingType , ctx, error: String ) ,
426
426
Self :: BytesTooShort { .. } => extract_context ! ( BytesTooShort , ctx, min_length: usize ) ,
@@ -498,7 +498,7 @@ impl ErrorType {
498
498
Self :: StringTooShort { ..} => "String should have at least {min_length} characters" ,
499
499
Self :: StringTooLong { ..} => "String should have at most {max_length} characters" ,
500
500
Self :: StringPatternMismatch { ..} => "String should match pattern '{pattern}'" ,
501
- Self :: Enum { ..} => "Input should be {options }" ,
501
+ Self :: Enum { ..} => "Input should be {expected }" ,
502
502
Self :: DictType => "Input should be a valid dictionary" ,
503
503
Self :: MappingType { ..} => "Input should be a valid mapping, error: {error}" ,
504
504
Self :: ListType => "Input should be a valid list" ,
@@ -635,7 +635,7 @@ impl ErrorType {
635
635
Self :: StringTooShort { min_length } => to_string_render ! ( tmpl, min_length) ,
636
636
Self :: StringTooLong { max_length } => to_string_render ! ( tmpl, max_length) ,
637
637
Self :: StringPatternMismatch { pattern } => render ! ( tmpl, pattern) ,
638
- Self :: Enum { options } => to_string_render ! ( tmpl, options ) ,
638
+ Self :: Enum { expected } => to_string_render ! ( tmpl, expected ) ,
639
639
Self :: MappingType { error } => render ! ( tmpl, error) ,
640
640
Self :: BytesTooShort { min_length } => to_string_render ! ( tmpl, min_length) ,
641
641
Self :: BytesTooLong { max_length } => to_string_render ! ( tmpl, max_length) ,
@@ -695,7 +695,7 @@ impl ErrorType {
695
695
Self :: StringTooShort { min_length } => py_dict ! ( py, min_length) ,
696
696
Self :: StringTooLong { max_length } => py_dict ! ( py, max_length) ,
697
697
Self :: StringPatternMismatch { pattern } => py_dict ! ( py, pattern) ,
698
- Self :: Enum { options } => py_dict ! ( py, options ) ,
698
+ Self :: Enum { expected } => py_dict ! ( py, expected ) ,
699
699
Self :: MappingType { error } => py_dict ! ( py, error) ,
700
700
Self :: BytesTooShort { min_length } => py_dict ! ( py, min_length) ,
701
701
Self :: BytesTooLong { max_length } => py_dict ! ( py, max_length) ,
0 commit comments