diff options
author | Andinus <andinus@nand.sh> | 2021-09-08 23:09:02 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2021-09-08 23:09:02 +0530 |
commit | ad9f2bf5df32e800113d0952211535f6798d522d (patch) | |
tree | 754592529e9defa76d5badfa26f77988c67dbd5f /rust | |
parent | 09e7fe7c4bae239bda9290d3dca0fe51bee9211e (diff) | |
download | exercism-ad9f2bf5df32e800113d0952211535f6798d522d.tar.gz |
Rust: Lucian's Luscious Lasagna: Format code, global constants
Diffstat (limited to 'rust')
-rw-r--r-- | rust/lucians-luscious-lasagna/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/lucians-luscious-lasagna/src/lib.rs b/rust/lucians-luscious-lasagna/src/lib.rs index 06ea99a..9b7ae79 100644 --- a/rust/lucians-luscious-lasagna/src/lib.rs +++ b/rust/lucians-luscious-lasagna/src/lib.rs @@ -1,5 +1,7 @@ +const EXPECTED_TIME: i32 = 40; +const TIME_REQUIRED_FOR_A_LAYER: i32 = 2; + pub fn expected_minutes_in_oven() -> i32 { - const EXPECTED_TIME: i32 = 40; EXPECTED_TIME } @@ -8,11 +10,9 @@ pub fn remaining_minutes_in_oven(actual_minutes_in_oven: i32) -> i32 { } pub fn preparation_time_in_minutes(number_of_layers: i32) -> i32 { - const TIME_REQUIRED_FOR_A_LAYER: i32 = 2; number_of_layers * TIME_REQUIRED_FOR_A_LAYER } -pub fn elapsed_time_in_minutes(number_of_layers: i32, - actual_minutes_in_oven: i32) -> i32 { +pub fn elapsed_time_in_minutes(number_of_layers: i32, actual_minutes_in_oven: i32) -> i32 { preparation_time_in_minutes(number_of_layers) + actual_minutes_in_oven } |