File tree 1 file changed +6
-9
lines changed
1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -692,17 +692,14 @@ impl fmt::Display for Error {
692
692
}
693
693
}
694
694
695
- #[ cfg( any ( feature = "std" , test ) ) ]
695
+ #[ cfg( feature = "std" ) ]
696
696
impl std:: error:: Error for Error {
697
- fn description ( & self ) -> & str {
697
+ fn source ( & self ) -> Option < & ( dyn std:: error:: Error + ' static ) > {
698
+ use self :: Error :: * ;
699
+
698
700
match * self {
699
- Error :: MissingSeparator => "missing human-readable separator" ,
700
- Error :: InvalidChecksum => "invalid checksum" ,
701
- Error :: InvalidLength => "invalid length" ,
702
- Error :: InvalidChar ( _) => "invalid character" ,
703
- Error :: InvalidData ( _) => "invalid data point" ,
704
- Error :: InvalidPadding => "invalid padding" ,
705
- Error :: MixedCase => "mixed-case strings not allowed" ,
701
+ MissingSeparator | InvalidChecksum | InvalidLength | InvalidChar ( _)
702
+ | InvalidData ( _) | InvalidPadding | MixedCase => None ,
706
703
}
707
704
}
708
705
}
You can’t perform that action at this time.
0 commit comments