replace serde with miniserde
This commit is contained in:
@ -2,7 +2,6 @@ use std::{error, io};
|
||||
|
||||
use jsonrpc_core::{types::error::Error, ErrorCode};
|
||||
use probes::ProbeError;
|
||||
use serde_json::Error as SerdeError;
|
||||
use snafu::Snafu;
|
||||
|
||||
pub type BoxError = Box<dyn error::Error>;
|
||||
@ -24,9 +23,6 @@ pub enum StatError {
|
||||
|
||||
#[snafu(display("Failed to retrieve system uptime: {}", source))]
|
||||
ReadUptime { source: io::Error },
|
||||
|
||||
#[snafu(display("JSON serialization failed: {}", source))]
|
||||
SerdeSerialize { source: SerdeError },
|
||||
}
|
||||
|
||||
impl From<StatError> for Error {
|
||||
@ -57,11 +53,6 @@ impl From<StatError> for Error {
|
||||
message: format!("Failed to retrieve system uptime: {}", source),
|
||||
data: None,
|
||||
},
|
||||
StatError::SerdeSerialize { source } => Error {
|
||||
code: ErrorCode::ServerError(-32002),
|
||||
message: format!("JSON serialization failed: {}", source),
|
||||
data: None,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user