From 08ff8db0ac5cec2909841ab61341f647e15318c2 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 28 Jul 2022 21:17:12 +0200 Subject: [PATCH] Add 'Error::InvalidPosition' variant --- src/error.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/error.rs b/src/error.rs index 535bd7b..d4a2004 100644 --- a/src/error.rs +++ b/src/error.rs @@ -2,12 +2,14 @@ #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] pub enum Error { InvalidFen, + InvalidPosition, } impl std::fmt::Display for Error { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let error_msg = match self { Self::InvalidFen => "Invalid FEN input", + Self::InvalidPosition => "Invalid position", }; write!(f, "{}", error_msg) }