From 92a81ae0704cad09f0e40b567731baa87da85736 Mon Sep 17 00:00:00 2001 From: Franklin Date: Sat, 15 Oct 2022 12:37:50 -0400 Subject: [PATCH] Added another leagueplayerstatus type --- src/domain/enums/league_player_status.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/domain/enums/league_player_status.rs b/src/domain/enums/league_player_status.rs index d8e3798..536f7d0 100644 --- a/src/domain/enums/league_player_status.rs +++ b/src/domain/enums/league_player_status.rs @@ -11,7 +11,8 @@ pub enum LeaguePlayerStatus { Requested, Kicked, Left, - Invited + Invited, + Canceled, } impl Display for LeaguePlayerStatus { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { @@ -21,7 +22,8 @@ impl Display for LeaguePlayerStatus { LeaguePlayerStatus::Requested => write!(f, "Requested"), LeaguePlayerStatus::Kicked => write!(f, "Kicked"), LeaguePlayerStatus::Left => write!(f, "Left"), - LeaguePlayerStatus::Invited => write!(f, "Invited") + LeaguePlayerStatus::Invited => write!(f, "Invited"), + LeaguePlayerStatus::Canceled => write!(f, "Canceled") } } } @@ -36,6 +38,7 @@ impl FromStr for LeaguePlayerStatus { "Kicked" => Ok(Self::Kicked), "Left" => Ok(Self::Requested), "Invited" => Ok(Self::Invited), + "Canceled" => Ok(Self::Canceled), _ => Err(Error::Unspecified) //TODO: Create ParseStr error in actix_web_utils } }