From cb9f1ac9ce3c834b0cca964b6809b74508f80b54 Mon Sep 17 00:00:00 2001 From: mo8it Date: Wed, 17 Apr 2024 22:46:21 +0200 Subject: Require a main function in all exercises --- exercises/11_hashmaps/hashmaps2.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'exercises/11_hashmaps/hashmaps2.rs') diff --git a/exercises/11_hashmaps/hashmaps2.rs b/exercises/11_hashmaps/hashmaps2.rs index 2730643..47983f6 100644 --- a/exercises/11_hashmaps/hashmaps2.rs +++ b/exercises/11_hashmaps/hashmaps2.rs @@ -41,6 +41,10 @@ fn fruit_basket(basket: &mut HashMap) { } } +fn main() { + // You can optionally experiment here. +} + #[cfg(test)] mod tests { use super::*; @@ -79,7 +83,7 @@ mod tests { let count = basket.values().sum::(); assert!(count > 11); } - + #[test] fn all_fruit_types_in_basket() { let mut basket = get_fruit_basket(); -- cgit v1.2.3