File tree Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ impl Display for HttpCodecError {
228
228
}
229
229
230
230
impl Error for HttpCodecError {
231
- fn cause ( & self ) -> Option < & dyn Error > {
231
+ fn source ( & self ) -> Option < & ( dyn Error + ' static ) > {
232
232
match * self {
233
233
HttpCodecError :: Io ( ref error) => Some ( error) ,
234
234
HttpCodecError :: Http ( ref error) => Some ( error) ,
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ impl fmt::Display for WebSocketOtherError {
92
92
}
93
93
94
94
impl Error for WebSocketOtherError {
95
- fn cause ( & self ) -> Option < & dyn Error > {
95
+ fn source ( & self ) -> Option < & ( dyn Error + ' static ) > {
96
96
match * self {
97
97
WebSocketOtherError :: HttpError ( ref error) => Some ( error) ,
98
98
WebSocketOtherError :: UrlError ( ref error) => Some ( error) ,
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ impl Display for HyperIntoWsError {
217
217
}
218
218
219
219
impl Error for HyperIntoWsError {
220
- fn cause ( & self ) -> Option < & dyn Error > {
220
+ fn source ( & self ) -> Option < & ( dyn Error + ' static ) > {
221
221
match * self {
222
222
HyperIntoWsError :: Io ( ref e) => Some ( e) ,
223
223
HyperIntoWsError :: Parsing ( ref e) => Some ( e) ,
Original file line number Diff line number Diff line change @@ -54,12 +54,11 @@ impl fmt::Display for WebSocketError {
54
54
}
55
55
56
56
impl Error for WebSocketError {
57
- #[ allow( deprecated) ]
58
- fn cause ( & self ) -> Option < & dyn Error > {
57
+ fn source ( & self ) -> Option < & ( dyn Error + ' static ) > {
59
58
match * self {
60
59
WebSocketError :: IoError ( ref error) => Some ( error) ,
61
60
WebSocketError :: Utf8Error ( ref error) => Some ( error) ,
62
- WebSocketError :: Other ( ref error) => error. cause ( ) ,
61
+ WebSocketError :: Other ( ref error) => error. source ( ) ,
63
62
_ => None ,
64
63
}
65
64
}
You can’t perform that action at this time.
0 commit comments