From 01242198fafd2642cca149a594794e8a8494bd3b Mon Sep 17 00:00:00 2001 From: Neil Pate Date: Sat, 1 Jan 2022 11:22:26 +0100 Subject: [PATCH] refactor: Changed function name to be more accurate A new programmer looking at the method name might assume that the purpose of the function is to return just the price of a single apple rather than the total price taking the discount into effect. --- exercises/quiz1.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/quiz1.rs b/exercises/quiz1.rs index 7bd3f589..8d05b110 100644 --- a/exercises/quiz1.rs +++ b/exercises/quiz1.rs @@ -11,14 +11,14 @@ // I AM NOT DONE // Put your function here! -// fn calculate_apple_price { +// fn calculate_price_of_apples { // Don't modify this function! #[test] fn verify_test() { - let price1 = calculate_apple_price(35); - let price2 = calculate_apple_price(40); - let price3 = calculate_apple_price(65); + let price1 = calculate_price_of_apples(35); + let price2 = calculate_price_of_apples(40); + let price3 = calculate_price_of_apples(65); assert_eq!(70, price1); assert_eq!(80, price2);