1
0

Better panic message.

This commit is contained in:
Florent DENEF 2022-12-02 16:42:46 +01:00
parent 0d7097dbf8
commit a490b2a72f

View File

@ -40,7 +40,10 @@ impl From<char> for Play {
'X' => Play::Rock,
'Y' => Play::Paper,
'Z' => Play::Scissors,
_ => panic!("Only A, B, C, X, Y or Z letters are available."),
other => panic!(
"Only A, B, C, X, Y or Z letters are available. Had {}",
other
),
}
}
}