From 84d4afdb181ec43b924b18030c6eb02edb7b68dd Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Thu, 4 Apr 2024 20:47:33 +0200 Subject: [PATCH] cligame: better error when word is not in wordlist --- src/bin/game/cli.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bin/game/cli.rs b/src/bin/game/cli.rs index 001c08f..3c74d21 100644 --- a/src/bin/game/cli.rs +++ b/src/bin/game/cli.rs @@ -58,6 +58,10 @@ fn main() -> anyhow::Result<()> { println!("word length: must be {} long but is {}", game.length(), len); continue; } + GameError::WordNotInWordlist(w) => { + println!("bad word: word \"{w}\" is not in the wordlist",); + continue; + } _ => { return Err(err.into()); }