feat: Added exercise structs3.rs

This commit is contained in:
Dídac Sementé Fernández
2020-04-27 20:17:26 +02:00
parent 32721bbc83
commit b66e2e0962
2 changed files with 80 additions and 0 deletions

View File

@@ -232,6 +232,19 @@ Creating instances of structs is easy, all you need to do is assign some values
There is however some shortcuts that can be taken when instantiating structs.
Have a look in The Book, to find out more: https://doc.rust-lang.org/stable/book/ch05-01-defining-structs.html#creating-instances-from-other-instances-with-struct-update-syntax"""
[[exercises]]
name = "structs3"
path = "exercises/structs/structs3.rs"
mode = "test"
hint = """
The new method needs to panic if the weight is physically impossible :), how do we do that in Rust?
For is_international: What makes a package international? Seems related to the places it goes through right?
For calculate_transport_fees: Bigger is more expensive usually, we don't have size, but something may fit the bill here :)
Have a look in The Book, to find out more about method implementations: https://doc.rust-lang.org/book/ch05-03-method-syntax.html"""
# STRINGS
[[exercises]]