mirror of
https://github.com/mainmatter/100-exercises-to-learn-rust
synced 2025-01-30 08:34:50 +01:00
Merge pull request #251 from MHMasoon/patch-1
match panic message with the test expected message
This commit is contained in:
commit
d347d1f72e
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
fn speed(start: u32, end: u32, time_elapsed: u32) -> u32 {
|
||||
// TODO: Panic with a custom message if `time_elapsed` is 0
|
||||
if time_elapsed == 0 {
|
||||
panic!("The journey took no time at all, that's impossible!");
|
||||
panic!("The journey took no time at all. That's impossible!");
|
||||
}
|
||||
|
||||
(end - start) / time_elapsed
|
||||
|
|
Loading…
Add table
Reference in a new issue