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