day(22): fix clippy warnings
Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
13a0b3dbf7
commit
7093f4f7d0
1 changed files with 2 additions and 2 deletions
|
@ -324,7 +324,7 @@ impl Solution<Input, Output> 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<Input, Output> 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),
|
||||
|
|
Loading…
Reference in a new issue