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 11#[ cfg( not( feature = "std" ) ) ]
2- use core2:: io:: Error as IoError ;
2+ use core2:: { error :: Error as StdError , io:: Error as IoError } ;
33#[ cfg( feature = "std" ) ]
4- use std:: io:: Error as IoError ;
4+ use std:: { error :: Error as StdError , io:: Error as IoError } ;
55
66use unsigned_varint:: decode:: Error as DecodeError ;
77#[ cfg( feature = "std" ) ]
@@ -32,20 +32,8 @@ impl core::fmt::Display for Error {
3232 }
3333}
3434
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 { }
4036
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" ) ]
4937impl From < IoError > for Error {
5038 fn from ( err : IoError ) -> Self {
5139 Self :: Io ( err)
You can’t perform that action at this time.
0 commit comments