day[47]: lint cleanup.

This commit is contained in:
Bill Thiede 2021-12-07 20:11:31 -08:00
parent 0483ba1c77
commit b030505425
2 changed files with 2 additions and 1 deletions

View File

@ -156,6 +156,7 @@ impl MarkerBoard {
fn is_bingo(&self) -> bool { fn is_bingo(&self) -> bool {
let h = 0b11111; let h = 0b11111;
#[allow(clippy::unusual_byte_groupings)]
let v = 0b00001_00001_00001_00001_00001; let v = 0b00001_00001_00001_00001_00001;
let m = self.0; let m = self.0;

View File

@ -87,7 +87,7 @@ fn score2(nums: &[u64], mid: u64) -> u64 {
#[aoc(day7, part2)] #[aoc(day7, part2)]
fn part2(input: &[u64]) -> Result<u64> { fn part2(input: &[u64]) -> Result<u64> {
let mut input: Vec<_> = input.to_vec(); let input: Vec<_> = input.to_vec();
let avg = input.iter().sum::<u64>() / input.len() as u64; let avg = input.iter().sum::<u64>() / input.len() as u64;
let s = if avg > 10 { avg - 10 } else { 0 }; let s = if avg > 10 { avg - 10 } else { 0 };