minor error matching cleanup

This commit is contained in:
mos 2024-10-13 14:44:32 +02:00
parent cb9ae923f5
commit 1b411e31eb
1 changed files with 1 additions and 3 deletions

View File

@ -4,7 +4,6 @@ use std::io::{BufRead, BufReader};
pub type Result<T> = std::result::Result<T, Error>; pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug)]
pub enum Error { pub enum Error {
ReadError, ReadError,
BadFile, BadFile,
@ -19,8 +18,7 @@ impl fmt::Display for Error {
match self { match self {
Self::ReadError => write!(f, "errors found"), Self::ReadError => write!(f, "errors found"),
Self::BadFile => write!(f, "invalid text"), Self::BadFile => write!(f, "invalid text"),
Self::BadWrite(e) => write!(f, "{e}"), Self::BadWrite(e) | Self::BadPath(e) => write!(f, "{e}"),
Self::BadPath(e) => write!(f, "{e}"),
Self::BpError(e) => write!(f, "{e}"), Self::BpError(e) => write!(f, "{e}"),
Self::ParseError(e) => write!(f, "{e}"), Self::ParseError(e) => write!(f, "{e}"),
} }