File tree Expand file tree Collapse file tree 3 files changed +25
-5
lines changed Expand file tree Collapse file tree 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 {
8181impl error:: Error for DecoderError {
8282 fn description ( & self ) -> & str {
8383 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+ }
8694 DecoderError :: UnrecognizedElementType ( _) => "unrecognized element type" ,
8795 DecoderError :: InvalidArrayKey ( ..) => "invalid array key" ,
8896 DecoderError :: ExpectedField ( _) => "expected a field" ,
Original file line number Diff line number Diff line change @@ -45,7 +45,11 @@ impl fmt::Display for EncoderError {
4545impl error:: Error for EncoderError {
4646 fn description ( & self ) -> & str {
4747 match * self {
48- EncoderError :: IoError ( ref inner) => inner. description ( ) ,
48+ EncoderError :: IoError ( ref inner) =>
49+ {
50+ #[ allow( deprecated) ]
51+ inner. description ( )
52+ }
4953 EncoderError :: InvalidMapKeyType ( _) => "Invalid map key type" ,
5054 EncoderError :: Unknown ( ref inner) => inner,
5155 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 {
6969 fn description ( & self ) -> & str {
7070 match * self {
7171 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+ }
7482 Error :: HostnameError => "Failed to retrieve hostname for OID generation." ,
7583 }
7684 }
You can’t perform that action at this time.
0 commit comments