This commit is contained in:
blacktoast 2021-09-30 05:21:47 +00:00
parent eb3e9dabb6
commit 765740841f
2 changed files with 2 additions and 1 deletions

View File

@ -33,7 +33,7 @@ mod tests {
#[test]
fn tuple_structs() {
// TODO: Instantiate a tuple struct!
let green =(String::from("green"),String::from("#00FF00"));
let green =(String::from("en"),String::from("#00FF00"));
assert_eq!(green.0, "green");
assert_eq!(green.1, "#00FF00");

View File

@ -17,6 +17,7 @@ impl Package {
fn new(sender_country: String, recipient_country: String, weight_in_grams: i32) -> Package {
if weight_in_grams <= 0 {
// Something goes here...
// panic!("Oh no")
} else {
return Package {
sender_country,