From 218fd6a0834854dea643553073551817897a0444 Mon Sep 17 00:00:00 2001 From: Franklin Date: Thu, 13 Oct 2022 12:39:41 -0400 Subject: [PATCH] Added invited league player status --- src/domain/enums/league_player_status.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/domain/enums/league_player_status.rs b/src/domain/enums/league_player_status.rs index b93b5f9..d8e3798 100644 --- a/src/domain/enums/league_player_status.rs +++ b/src/domain/enums/league_player_status.rs @@ -1,4 +1,4 @@ -use std::{fmt::Display, str::FromStr}; +use std::{fmt::{Display}, str::FromStr}; use serde::{Serialize, Deserialize}; use err::Error; @@ -10,7 +10,8 @@ pub enum LeaguePlayerStatus { #[default] Requested, Kicked, - Left + Left, + Invited } impl Display for LeaguePlayerStatus { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { @@ -19,7 +20,8 @@ impl Display for LeaguePlayerStatus { LeaguePlayerStatus::Joined => write!(f, "Joined"), LeaguePlayerStatus::Requested => write!(f, "Requested"), LeaguePlayerStatus::Kicked => write!(f, "Kicked"), - LeaguePlayerStatus::Left => write!(f, "Left") + LeaguePlayerStatus::Left => write!(f, "Left"), + LeaguePlayerStatus::Invited => write!(f, "Invited") } } } @@ -33,6 +35,7 @@ impl FromStr for LeaguePlayerStatus { "Requested" => Ok(Self::Requested), "Kicked" => Ok(Self::Kicked), "Left" => Ok(Self::Requested), + "Invited" => Ok(Self::Invited), _ => Err(Error::Unspecified) //TODO: Create ParseStr error in actix_web_utils } }