From 1b411e31ebcec93f5f61baded54d050bb514bbec Mon Sep 17 00:00:00 2001 From: mos Date: Sun, 13 Oct 2024 14:44:32 +0200 Subject: [PATCH] minor error matching cleanup --- bipc/src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bipc/src/lib.rs b/bipc/src/lib.rs index 4d0f8fa..9d118ef 100644 --- a/bipc/src/lib.rs +++ b/bipc/src/lib.rs @@ -4,7 +4,6 @@ use std::io::{BufRead, BufReader}; pub type Result = std::result::Result; -#[derive(Debug)] pub enum Error { ReadError, BadFile, @@ -19,8 +18,7 @@ impl fmt::Display for Error { match self { Self::ReadError => write!(f, "errors found"), Self::BadFile => write!(f, "invalid text"), - Self::BadWrite(e) => write!(f, "{e}"), - Self::BadPath(e) => write!(f, "{e}"), + Self::BadWrite(e) | Self::BadPath(e) => write!(f, "{e}"), Self::BpError(e) => write!(f, "{e}"), Self::ParseError(e) => write!(f, "{e}"), }