Skip to content

Commit 337e9ab

Browse files
committed
marker#1
Signed-off-by: [email protected] <[email protected]>
1 parent 6702a36 commit 337e9ab

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

src/event/spec_version.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ impl fmt::Display for UnknownSpecVersion {
6060
}
6161
}
6262

63-
impl std::error::Error for UnknownSpecVersion {}
63+
impl no_error::Error for InvalidSpecVersion {}
6464

6565
impl TryFrom<&str> for SpecVersion {
6666
type Error = UnknownSpecVersion;
6767

68-
fn try_from(value: &str) -> Result<Self, UnknownSpecVersion> {
68+
fn try_from(value: &str) -> core::result::Result<Self, InvalidSpecVersion> {
6969
match value {
7070
"0.3" => Ok(SpecVersion::V03),
7171
"1.0" => Ok(SpecVersion::V10),

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
#![no_std]
4343

4444
extern crate no_std_compat as std;
45+
extern crate no_error;
46+
extern crate core_io;
4547

4648
extern crate serde;
4749
extern crate serde_json;

src/message/error.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use no_error::*;
2+
use core_io::Error;
13
use snafu::Snafu;
24
use std::prelude::v1::*;
35

@@ -32,11 +34,9 @@ pub enum Error {
3234
SerdeJsonError { source: serde_json::Error },
3335
#[snafu(display("IO Error: {}", source))]
3436
#[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> },
4040
}
4141

4242
/// Result type alias for return values during serialization/deserialization process

0 commit comments

Comments
 (0)