Cleanup
This commit is contained in:
12
src/error.rs
12
src/error.rs
@ -1,7 +1,6 @@
|
||||
use std::borrow::Borrow;
|
||||
use std::fmt;
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub enum Kind {
|
||||
InvalidEndpointError,
|
||||
JsonParseError,
|
||||
@ -11,12 +10,13 @@ pub enum Kind {
|
||||
IoError,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub enum Class {
|
||||
ClientError,
|
||||
ServerError,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Error {
|
||||
kind: Kind,
|
||||
msg: Option<String>,
|
||||
@ -89,12 +89,6 @@ impl fmt::Display for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for Error {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
self.fmt(f)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<std::io::Error> for Error {
|
||||
fn from(error: std::io::Error) -> Self {
|
||||
Error {
|
||||
|
Reference in New Issue
Block a user