fix(structs3): Add panic! statement into structs3

closes #685
This commit is contained in:
camperdue42 2021-12-31 01:05:34 -05:00 committed by mokou
parent 4dffa0d10d
commit 4531c21bf1

View file

@ -16,7 +16,7 @@ struct Package {
impl Package { impl Package {
fn new(sender_country: String, recipient_country: String, weight_in_grams: i32) -> Package { fn new(sender_country: String, recipient_country: String, weight_in_grams: i32) -> Package {
if weight_in_grams <= 0 { if weight_in_grams <= 0 {
// panic statement goes here... panic!("Can not ship a weightless package.")
} else { } else {
Package { Package {
sender_country, sender_country,