mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-22 14:02:22 -05:00
parent
4dffa0d10d
commit
4531c21bf1
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue