clippies
Some checks failed
test / AoC 2024 (push) Failing after 1m14s

This commit is contained in:
Keenan Tims 2024-12-13 17:55:25 -08:00
parent d6d81a0c29
commit d88f907c03
Signed by: ktims
GPG Key ID: 11230674D69038D4
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
use std::str::FromStr; use std::str::FromStr;
use aoc_runner_derive::{aoc, aoc_generator}; use aoc_runner_derive::aoc;
use grid::{Coord2d, Grid}; use grid::{Coord2d, Grid};
pub struct Farm { pub struct Farm {

View File

@ -20,9 +20,9 @@ impl ClawMachine {
let prize_re = Regex::new(r"X=(\d+), Y=(\d+)").unwrap(); let prize_re = Regex::new(r"X=(\d+), Y=(\d+)").unwrap();
// consume 3 lines - a, b, prize // consume 3 lines - a, b, prize
if let Some((a_line, b_line, prize_line)) = input.filter(|l| !l.is_empty()).take(3).collect_tuple() { if let Some((a_line, b_line, prize_line)) = input.filter(|l| !l.is_empty()).take(3).collect_tuple() {
let a_caps = ofs_re.captures(&a_line).unwrap(); let a_caps = ofs_re.captures(a_line).unwrap();
let b_caps = ofs_re.captures(&b_line).unwrap(); let b_caps = ofs_re.captures(b_line).unwrap();
let prize_caps = prize_re.captures(&prize_line).unwrap(); let prize_caps = prize_re.captures(prize_line).unwrap();
let button_a = MachineAction( let button_a = MachineAction(
a_caps.get(1).unwrap().as_str().parse().unwrap(), a_caps.get(1).unwrap().as_str().parse().unwrap(),
a_caps.get(2).unwrap().as_str().parse().unwrap(), a_caps.get(2).unwrap().as_str().parse().unwrap(),