From 7093f4f7d00ef1d7ecca351323c43c6dabc3c4e4 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Fri, 7 Jul 2023 13:33:26 +0200 Subject: [PATCH] day(22): fix clippy warnings Signed-off-by: Matej Focko --- src/bin/day22.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/day22.rs b/src/bin/day22.rs index ec03bca..e622261 100644 --- a/src/bin/day22.rs +++ b/src/bin/day22.rs @@ -324,7 +324,7 @@ impl Solution for Day22 { let steps: String = it .clone() .skip(skip) - .take_while(|c| c.is_digit(10)) + .take_while(|c| c.is_ascii_digit()) .collect(); if !steps.is_empty() { // found a move instruction @@ -333,7 +333,7 @@ impl Solution for Day22 { continue; } - match it.clone().skip(skip).next().unwrap() { + match it.clone().nth(skip).unwrap() { 'L' => instructions.push(Instruction::TurnLeft), 'R' => instructions.push(Instruction::TurnRight), x => panic!("Invalid turn: {}", x),