Exercise 33

This commit is contained in:
akshitgautam42 2023-11-13 14:28:46 +05:30
parent 35a8581791
commit 930ef91565

View File

@ -7,7 +7,6 @@
// Execute `rustlings hint structs3` or use the `hint` watch subcommand for a
// hint.
// I AM NOT DONE
#[derive(Debug)]
struct Package {
@ -31,12 +30,12 @@ impl Package {
}
}
fn is_international(&self) -> ??? {
// Something goes here...
fn is_international(&self) -> bool {
return self.recipient_country != self.sender_country
}
fn get_fees(&self, cents_per_gram: u32) -> ??? {
// Something goes here...
fn get_fees(&self, cents_per_gram: u32) -> u32 {
return self.weight_in_grams*cents_per_gram
}
}