diff options
author | Andinus <andinus@nand.sh> | 2021-09-07 21:23:36 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2021-09-07 21:25:21 +0530 |
commit | 541096f04729909a5bed0e837a5d3726e2adbfb2 (patch) | |
tree | 191abc5564752aa3e00373e6ef1eb81715e2fc32 /rust | |
parent | a6a08927f762a0d30c8e199cd2c1386ee2e08d0e (diff) | |
download | exercism-541096f04729909a5bed0e837a5d3726e2adbfb2.tar.gz |
Rust: Lucian's Luscious Lasagna: Use implicit return
Diffstat (limited to 'rust')
-rw-r--r-- | rust/lucians-luscious-lasagna/src/lib.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/rust/lucians-luscious-lasagna/src/lib.rs b/rust/lucians-luscious-lasagna/src/lib.rs index 0028195..19da8d3 100644 --- a/rust/lucians-luscious-lasagna/src/lib.rs +++ b/rust/lucians-luscious-lasagna/src/lib.rs @@ -1,17 +1,14 @@ -pub fn expected_minutes_in_oven() -> i32 { - return 40; -} +pub fn expected_minutes_in_oven() -> i32 { 40 } pub fn remaining_minutes_in_oven(actual_minutes_in_oven: i32) -> i32 { - return expected_minutes_in_oven() - actual_minutes_in_oven; + expected_minutes_in_oven() - actual_minutes_in_oven } pub fn preparation_time_in_minutes(number_of_layers: i32) -> i32 { - return number_of_layers * 2; + number_of_layers * 2 } pub fn elapsed_time_in_minutes(number_of_layers: i32, actual_minutes_in_oven: i32) -> i32 { - return preparation_time_in_minutes(number_of_layers) - + actual_minutes_in_oven; + preparation_time_in_minutes(number_of_layers) + actual_minutes_in_oven } |