From b66e2e09622243e086a0f1258dd27e1a2d61c891 Mon Sep 17 00:00:00 2001 From: Dídac Sementé Fernández Date: Mon, 27 Apr 2020 20:17:26 +0200 Subject: feat: Added exercise structs3.rs --- info.toml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'info.toml') diff --git a/info.toml b/info.toml index 71bb3dd..1d0701f 100644 --- a/info.toml +++ b/info.toml @@ -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]] -- cgit v1.2.3