File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change 1
1
#[ cfg( not( feature = "std" ) ) ]
2
- use core2:: io:: Error as IoError ;
2
+ use core2:: { error :: Error as StdError , io:: Error as IoError } ;
3
3
#[ cfg( feature = "std" ) ]
4
- use std:: io:: Error as IoError ;
4
+ use std:: { error :: Error as StdError , io:: Error as IoError } ;
5
5
6
6
use unsigned_varint:: decode:: Error as DecodeError ;
7
7
#[ cfg( feature = "std" ) ]
@@ -32,20 +32,8 @@ impl core::fmt::Display for Error {
32
32
}
33
33
}
34
34
35
- #[ cfg( feature = "std" ) ]
36
- impl std:: error:: Error for Error { }
37
-
38
- #[ cfg( not( feature = "std" ) ) ]
39
- impl core2:: error:: Error for Error { }
35
+ impl StdError for Error { }
40
36
41
- #[ cfg( not( feature = "std" ) ) ]
42
- impl From < core2:: io:: Error > for Error {
43
- fn from ( err : core2:: io:: Error ) -> Self {
44
- Self :: Io ( err)
45
- }
46
- }
47
-
48
- #[ cfg( feature = "std" ) ]
49
37
impl From < IoError > for Error {
50
38
fn from ( err : IoError ) -> Self {
51
39
Self :: Io ( err)
You can’t perform that action at this time.
0 commit comments