File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -60,12 +60,12 @@ impl fmt::Display for UnknownSpecVersion {
60
60
}
61
61
}
62
62
63
- impl std :: error :: Error for UnknownSpecVersion { }
63
+ impl no_error :: Error for InvalidSpecVersion { }
64
64
65
65
impl TryFrom < & str > for SpecVersion {
66
66
type Error = UnknownSpecVersion ;
67
67
68
- fn try_from ( value : & str ) -> Result < Self , UnknownSpecVersion > {
68
+ fn try_from ( value : & str ) -> core :: result :: Result < Self , InvalidSpecVersion > {
69
69
match value {
70
70
"0.3" => Ok ( SpecVersion :: V03 ) ,
71
71
"1.0" => Ok ( SpecVersion :: V10 ) ,
Original file line number Diff line number Diff line change 42
42
#![ no_std]
43
43
44
44
extern crate no_std_compat as std;
45
+ extern crate no_error;
46
+ extern crate core_io;
45
47
46
48
extern crate serde;
47
49
extern crate serde_json;
Original file line number Diff line number Diff line change
1
+ use no_error:: * ;
2
+ use core_io:: Error ;
1
3
use snafu:: Snafu ;
2
4
use std:: prelude:: v1:: * ;
3
5
@@ -32,11 +34,9 @@ pub enum Error {
32
34
SerdeJsonError { source : serde_json:: Error } ,
33
35
#[ snafu( display( "IO Error: {}" , source) ) ]
34
36
#[ snafu( context( false ) ) ]
35
- IOError { source : std:: io:: Error } ,
36
- #[ snafu( display( "Other error: {}" , source) ) ]
37
- Other {
38
- source : Box < dyn std:: error:: Error + Send + Sync > ,
39
- } ,
37
+ IOError { source : core_io:: Error } ,
38
+ #[ snafu( display( "Other error: {:#?}" , source) ) ]
39
+ Other { source : Box < dyn std:: error:: Error > } ,
40
40
}
41
41
42
42
/// Result type alias for return values during serialization/deserialization process
You can’t perform that action at this time.
0 commit comments