From 741b313bd282b6cbc165e7b12c94247ef71daee1 Mon Sep 17 00:00:00 2001 From: Hariettemaina Date: Fri, 9 Sep 2022 15:04:07 +0300 Subject: [PATCH] returning a type --- exercises/functions/functions3.rs | 2 +- exercises/functions/functions4.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/functions/functions3.rs b/exercises/functions/functions3.rs index d8e28713..e31f364f 100644 --- a/exercises/functions/functions3.rs +++ b/exercises/functions/functions3.rs @@ -1,7 +1,7 @@ // functions3.rs // Execute `rustlings hint functions3` or use the `hint` watch subcommand for a hint. -// I AM NOT DONE + fn main() { call_me(3); diff --git a/exercises/functions/functions4.rs b/exercises/functions/functions4.rs index 65d5be4f..95e63c39 100644 --- a/exercises/functions/functions4.rs +++ b/exercises/functions/functions4.rs @@ -14,7 +14,7 @@ fn main() { println!("Your sale price is {}", sale_price(original_price)); } -fn sale_price(price: i32) -> { +fn sale_price(price: i32) -> i32{ if is_even(price) { price - 10 } else {