Fmt + Clippy
This commit is contained in:
4 files changed
+28
-21
No files matched your search
+6
-7
@@ -1,16 +1,15 @@
|
||||
use std::error::Error;
|
||||
use std::fmt::{Display, Formatter};
|
||||
use crate::parser::ByteArrayParseErr;
|
||||
use crate::formatter::format::FormatError;
|
||||
use crate::formatter::FormatConfigError;
|
||||
use crate::parser::ByteArrayParseErr;
|
||||
use std::error::Error;
|
||||
use std::fmt::{Display, Formatter};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum FormatyError {
|
||||
ByteArrayParseError(ByteArrayParseErr),
|
||||
FormatError(FormatError),
|
||||
FormatConfigError(FormatConfigError),
|
||||
FormatNotFound(String)
|
||||
|
||||
FormatNotFound(String),
|
||||
}
|
||||
|
||||
impl From<ByteArrayParseErr> for FormatyError {
|
||||
@@ -37,11 +36,11 @@ impl Display for FormatyError {
|
||||
FormatyError::ByteArrayParseError(e) => e.to_string(),
|
||||
FormatyError::FormatError(e) => e.to_string(),
|
||||
FormatyError::FormatConfigError(e) => e.to_string(),
|
||||
FormatyError::FormatNotFound(err_msg) => format!("'{}' config not found.", err_msg)
|
||||
FormatyError::FormatNotFound(err_msg) => format!("'{}' config not found.", err_msg),
|
||||
};
|
||||
|
||||
write!(f, "{}", err_msg)
|
||||
}
|
||||
}
|
||||
|
||||
impl Error for FormatyError {}
|
||||
impl Error for FormatyError {}
|
||||
Reference in new issue
Block a user