fix spelling mistake

This commit is contained in:
wangxu 2021-02-17 11:32:52 +08:00
parent 829ca9ab05
commit 7a1a3d434f

View file

@ -30,7 +30,7 @@ fn fruit_basket(basket: &mut HashMap<Fruit, u32>) {
Fruit::Apple, Fruit::Apple,
Fruit::Banana, Fruit::Banana,
Fruit::Mango, Fruit::Mango,
Fruit::Lichi, Fruit::Litchi,
Fruit::Pineapple, Fruit::Pineapple,
]; ];
@ -49,7 +49,7 @@ mod tests {
let mut basket = HashMap::<Fruit, u32>::new(); let mut basket = HashMap::<Fruit, u32>::new();
basket.insert(Fruit::Apple, 4); basket.insert(Fruit::Apple, 4);
basket.insert(Fruit::Mango, 2); basket.insert(Fruit::Mango, 2);
basket.insert(Fruit::Lichi, 5); basket.insert(Fruit::Litchi, 5);
basket basket
} }
@ -60,7 +60,7 @@ mod tests {
fruit_basket(&mut basket); fruit_basket(&mut basket);
assert_eq!(*basket.get(&Fruit::Apple).unwrap(), 4); assert_eq!(*basket.get(&Fruit::Apple).unwrap(), 4);
assert_eq!(*basket.get(&Fruit::Mango).unwrap(), 2); assert_eq!(*basket.get(&Fruit::Mango).unwrap(), 2);
assert_eq!(*basket.get(&Fruit::Lichi).unwrap(), 5); assert_eq!(*basket.get(&Fruit::Litchi).unwrap(), 5);
} }
#[test] #[test]