Skip to content

Commit b231acf

Browse files
committed
update
1 parent 29e7a33 commit b231acf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

exercises/structs/structs3.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// Execute `rustlings hint structs3` or use the `hint` watch subcommand for a
88
// hint.
99

10-
// I AM NOT DONE
10+
1111

1212
#[derive(Debug)]
1313
struct Package {
@@ -29,12 +29,14 @@ impl Package {
2929
}
3030
}
3131

32-
fn is_international(&self) -> ??? {
32+
fn is_international(&self) -> bool {
3333
// Something goes here...
34+
self.sender_country != self.recipient_country
3435
}
3536

36-
fn get_fees(&self, cents_per_gram: i32) -> ??? {
37+
fn get_fees(&self, cents_per_gram: i32) -> i32 {
3738
// Something goes here...
39+
self.weight_in_grams*cents_per_gram
3840
}
3941
}
4042

0 commit comments

Comments
 (0)