mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-01 16:03:31 +02:00
committed by
mokou
co-authored by
mokou
parent
4dffa0d10d
commit
4531c21bf1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user