Better panic message.
This commit is contained in:
parent
0d7097dbf8
commit
a490b2a72f
@ -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
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user