Advent of code day 1 in rust
https://gitlab.com/MisterBiggs/aoc_2022-rust/-/blob/master/src/day1.rs
```rust
fn part1(food_input: &str) -> usize {
food_input
.split("\n\n")
.collect::<Vec<&str>>()
.into_iter()
.map(|elf| {
elf.split_whitespace()
.map(|food| food.parse::<usize>().unwrap())
.sum()
})
.collect::<Vec<usize>>()
.into_iter()
.max()
.unwrap()
}
```
```rs
fn part2(food_input: &str) -> usize {
let mut elves_calories = food_input
.split("\n\n")
.collect::<Vec<&str>>()
.into_iter()
.map(|elf| {
elf.split_whitespace()
.map(|food| food.parse::<usize>().unwrap())
.sum()
})
.collect::<Vec<usize>>();
elves_calories.sort_by(|l, r| r.cmp(l));
elves_calories[..3].iter().sum::<usize>()
}
```