feat: completed solutions
This commit is contained in:
@@ -24,14 +24,16 @@ impl Package {
|
||||
}
|
||||
|
||||
// TODO: Add the correct return type to the function signature.
|
||||
fn is_international(&self) {
|
||||
fn is_international(&self) -> bool {
|
||||
// TODO: Read the tests that use this method to find out when a package
|
||||
// is considered international.
|
||||
self.sender_country != self.recipient_country
|
||||
}
|
||||
|
||||
// TODO: Add the correct return type to the function signature.
|
||||
fn get_fees(&self, cents_per_gram: u32) {
|
||||
fn get_fees(&self, cents_per_gram: u32) -> u32 {
|
||||
// TODO: Calculate the package's fees.
|
||||
cents_per_gram * self.weight_in_grams
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user