From 2e2bdac00092f8fcb96283da697a7a820a8c8978 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 12 Nov 2021 14:08:35 +0100 Subject: Minor code smell fixes --- src/fexpr/mod.rs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/fexpr/mod.rs') diff --git a/src/fexpr/mod.rs b/src/fexpr/mod.rs index 90242f2..0fe2acf 100644 --- a/src/fexpr/mod.rs +++ b/src/fexpr/mod.rs @@ -22,7 +22,6 @@ lalrpop_mod!(#[allow(clippy::all)] pub grammar, "/fexpr/grammar.rs"); #[derive(Debug)] pub struct FError { location: usize, - data: String, kind: FErrorKind, } @@ -41,17 +40,17 @@ impl error::Error for FError { #[derive(Debug, Error)] pub enum FErrorKind { #[error("invalid regular expression: {0}")] - InvalidRegex(#[from] regex::Error), + Regex(#[from] regex::Error), #[error("invalid fight outcome")] - InvalidFightOutcome, + FightOutcome, #[error("invalid weekday")] - InvalidWeekday, + Weekday, #[error("invalid timestamp: {0}")] - InvalidTimestamp(#[from] chrono::format::ParseError), + Timestamp(#[from] chrono::format::ParseError), #[error("invalid boss name")] - InvalidBoss, + Boss, #[error("invalid class name")] - InvalidClass, + Class, } /// Shortcut to create a new parser and parse the given input. -- cgit v1.2.3