Merge pull request #251 from MHMasoon/patch-1

match panic message with the test expected message
This commit is contained in:
Henk Oordt 2025-01-27 14:12:51 +01:00 committed by GitHub
commit d347d1f72e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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