From ae91f8b8e79ccaf157a9cde7cfa2bb34da97791f Mon Sep 17 00:00:00 2001 From: Sergei Orlov ||l <orlove.dev@gmail.com> Date: Mon, 14 Sep 2020 22:12:35 +0300 Subject: [PATCH] fix: measurement mismatch --- exercises/structs/structs3.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/structs/structs3.rs b/exercises/structs/structs3.rs index 36d46e9..c3ba875 100644 --- a/exercises/structs/structs3.rs +++ b/exercises/structs/structs3.rs @@ -29,8 +29,8 @@ impl Package { // Something goes here... } - fn get_fees(&self, cents_per_kg: i32) -> ??? { - // Something goes here... (beware of grams to kg conversion) + fn get_fees(&self, cents_per_gram: i32) -> i32 { + // Something goes here... } } @@ -62,10 +62,10 @@ mod tests { let sender_country = String::from("Spain"); let recipient_country = String::from("Spain"); - let cents_per_kg = ???; + let cents_per_gram = ???; let package = Package::new(sender_country, recipient_country, 1500); - assert_eq!(package.get_fees(cents_per_kg), 4500); + assert_eq!(package.get_fees(cents_per_gram), 4500); } }