Fmt + Clippy

This commit is contained in:
joeyahines committed 2022-04-09 12:40:37 -06:00
1 parent 59351fb699
commit 6407335362
4 files changed
+28 -21

No files matched your search

+6 -7
View File
@@ -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 {}