diff --git a/crates/lib/src/games/mindustry/types.rs b/crates/lib/src/games/mindustry/types.rs index fcb68a1..0bbf61d 100644 --- a/crates/lib/src/games/mindustry/types.rs +++ b/crates/lib/src/games/mindustry/types.rs @@ -52,14 +52,13 @@ impl TryFrom for GameMode { } impl GameMode { - fn as_str(&self) -> &'static str { - use GameMode::*; + const fn as_str(&self) -> &'static str { match self { - Survival => "survival", - Sandbox => "sandbox", - Attack => "attack", - PVP => "pvp", - Editor => "editor", + Self::Survival => "survival", + Self::Sandbox => "sandbox", + Self::Attack => "attack", + Self::PVP => "pvp", + Self::Editor => "editor", } } }