mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-07 19:29:18 +00:00
Exercise 33
This commit is contained in:
parent
35a8581791
commit
930ef91565
@ -7,7 +7,6 @@
|
|||||||
// Execute `rustlings hint structs3` or use the `hint` watch subcommand for a
|
// Execute `rustlings hint structs3` or use the `hint` watch subcommand for a
|
||||||
// hint.
|
// hint.
|
||||||
|
|
||||||
// I AM NOT DONE
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct Package {
|
struct Package {
|
||||||
@ -31,12 +30,12 @@ impl Package {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_international(&self) -> ??? {
|
fn is_international(&self) -> bool {
|
||||||
// Something goes here...
|
return self.recipient_country != self.sender_country
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_fees(&self, cents_per_gram: u32) -> ??? {
|
fn get_fees(&self, cents_per_gram: u32) -> u32 {
|
||||||
// Something goes here...
|
return self.weight_in_grams*cents_per_gram
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user