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
|
let steps: String = it
|
||||||
.clone()
|
.clone()
|
||||||
.skip(skip)
|
.skip(skip)
|
||||||
.take_while(|c| c.is_digit(10))
|
.take_while(|c| c.is_ascii_digit())
|
||||||
.collect();
|
.collect();
|
||||||
if !steps.is_empty() {
|
if !steps.is_empty() {
|
||||||
// found a move instruction
|
// found a move instruction
|
||||||
|
@ -333,7 +333,7 @@ impl Solution<Input, Output> for Day22 {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
match it.clone().skip(skip).next().unwrap() {
|
match it.clone().nth(skip).unwrap() {
|
||||||
'L' => instructions.push(Instruction::TurnLeft),
|
'L' => instructions.push(Instruction::TurnLeft),
|
||||||
'R' => instructions.push(Instruction::TurnRight),
|
'R' => instructions.push(Instruction::TurnRight),
|
||||||
x => panic!("Invalid turn: {}", x),
|
x => panic!("Invalid turn: {}", x),
|
||||||
|
|
Loading…
Reference in a new issue