diff options
| author | camperdue42 <camperdue42@gmail.com> | 2021-12-31 01:05:34 -0500 |
|---|---|---|
| committer | mokou <mokou@fastmail.com> | 2022-07-14 12:04:30 +0200 |
| commit | 4531c21bf1b54ff5fa8cc796584043b826cf78e8 (patch) | |
| tree | e9a8a1e8b62a151b45a2f7eac27b29a167508b51 /exercises | |
| parent | 4dffa0d10df61748b0098ad4428848e6f3e90bff (diff) | |
fix(structs3): Add panic! statement into structs3
closes #685
Diffstat (limited to 'exercises')
| -rw-r--r-- | exercises/structs/structs3.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/exercises/structs/structs3.rs b/exercises/structs/structs3.rs index e84f2eb..e5666e2 100644 --- a/exercises/structs/structs3.rs +++ b/exercises/structs/structs3.rs @@ -16,7 +16,7 @@ struct Package { impl Package { fn new(sender_country: String, recipient_country: String, weight_in_grams: i32) -> Package { if weight_in_grams <= 0 { - // panic statement goes here... + panic!("Can not ship a weightless package.") } else { Package { sender_country, |
