clippies
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use aoc_runner_derive::{aoc, aoc_generator};
|
||||
use lazy_static::lazy_static;
|
||||
use memoize::memoize;
|
||||
|
||||
type Bank = [u8];
|
||||
|
||||
#[aoc_generator(day3)]
|
||||
fn parse(input: &str) -> Vec<Vec<u8>> {
|
||||
input
|
||||
@@ -40,12 +35,12 @@ fn max_joltage(bank: Vec<u8>, n: usize) -> u64 {
|
||||
}
|
||||
|
||||
#[aoc(day3, part1)]
|
||||
fn part1(input: &Vec<Vec<u8>>) -> u64 {
|
||||
fn part1(input: &[Vec<u8>]) -> u64 {
|
||||
input.iter().map(|bank| max_joltage(bank.clone(), 2)).sum()
|
||||
}
|
||||
|
||||
#[aoc(day3, part2)]
|
||||
fn part2(input: &Vec<Vec<u8>>) -> u64 {
|
||||
fn part2(input: &[Vec<u8>]) -> u64 {
|
||||
input.iter().map(|bank| max_joltage(bank.clone(), 12)).sum()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user