File tree 3 files changed +25
-5
lines changed
3 files changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,16 @@ impl fmt::Display for DecoderError {
81
81
impl error:: Error for DecoderError {
82
82
fn description ( & self ) -> & str {
83
83
match * self {
84
- DecoderError :: IoError ( ref inner) => inner. description ( ) ,
85
- DecoderError :: FromUtf8Error ( ref inner) => inner. description ( ) ,
84
+ DecoderError :: IoError ( ref inner) =>
85
+ {
86
+ #[ allow( deprecated) ]
87
+ inner. description ( )
88
+ }
89
+ DecoderError :: FromUtf8Error ( ref inner) =>
90
+ {
91
+ #[ allow( deprecated) ]
92
+ inner. description ( )
93
+ }
86
94
DecoderError :: UnrecognizedElementType ( _) => "unrecognized element type" ,
87
95
DecoderError :: InvalidArrayKey ( ..) => "invalid array key" ,
88
96
DecoderError :: ExpectedField ( _) => "expected a field" ,
Original file line number Diff line number Diff line change @@ -45,7 +45,11 @@ impl fmt::Display for EncoderError {
45
45
impl error:: Error for EncoderError {
46
46
fn description ( & self ) -> & str {
47
47
match * self {
48
- EncoderError :: IoError ( ref inner) => inner. description ( ) ,
48
+ EncoderError :: IoError ( ref inner) =>
49
+ {
50
+ #[ allow( deprecated) ]
51
+ inner. description ( )
52
+ }
49
53
EncoderError :: InvalidMapKeyType ( _) => "Invalid map key type" ,
50
54
EncoderError :: Unknown ( ref inner) => inner,
51
55
EncoderError :: UnsupportedUnsignedType => "BSON does not support unsigned type" ,
Original file line number Diff line number Diff line change @@ -69,8 +69,16 @@ impl error::Error for Error {
69
69
fn description ( & self ) -> & str {
70
70
match * self {
71
71
Error :: ArgumentError ( ref inner) => & inner,
72
- Error :: FromHexError ( ref inner) => inner. description ( ) ,
73
- Error :: IoError ( ref inner) => inner. description ( ) ,
72
+ Error :: FromHexError ( ref inner) =>
73
+ {
74
+ #[ allow( deprecated) ]
75
+ inner. description ( )
76
+ }
77
+ Error :: IoError ( ref inner) =>
78
+ {
79
+ #[ allow( deprecated) ]
80
+ inner. description ( )
81
+ }
74
82
Error :: HostnameError => "Failed to retrieve hostname for OID generation." ,
75
83
}
76
84
}
You can’t perform that action at this time.
0 commit comments