mirror of
https://git.aramjonghu.dev/AramJonghu/rustlings.git
synced 2026-09-07 02:13:29 +02:00
Require a main function in all exercises
This commit is contained in:
@@ -41,6 +41,10 @@ fn fruit_basket(basket: &mut HashMap<Fruit, u32>) {
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
// You can optionally experiment here.
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
@@ -79,7 +83,7 @@ mod tests {
|
||||
let count = basket.values().sum::<u32>();
|
||||
assert!(count > 11);
|
||||
}
|
||||
|
||||
|
||||
#[test]
|
||||
fn all_fruit_types_in_basket() {
|
||||
let mut basket = get_fruit_basket();
|
||||
|
||||
Reference in New Issue
Block a user