clippy + remove debug
This commit is contained in:
parent
1484319343
commit
8b467093c9
|
@ -1,12 +1,10 @@
|
|||
use std::collections::HashSet;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Move {
|
||||
Left(u16),
|
||||
Right(u16),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
enum Direction {
|
||||
North,
|
||||
South,
|
||||
|
@ -14,7 +12,6 @@ enum Direction {
|
|||
West,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct Position {
|
||||
x: i32,
|
||||
y: i32,
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#[derive(Debug)]
|
||||
pub enum Direction {
|
||||
Up,
|
||||
Down,
|
||||
|
@ -92,7 +91,7 @@ fn do_moves_pt2(movements: &Vec<Direction>, grid: &[[char; 5]; 5], position: &mu
|
|||
}
|
||||
}
|
||||
|
||||
pub fn part1(moves: &Vec<Vec<Direction>>) -> String {
|
||||
pub fn part1(moves: &[Vec<Direction>]) -> String {
|
||||
let mut position = Position { x: 1, y: 1 };
|
||||
moves
|
||||
.iter()
|
||||
|
@ -103,7 +102,7 @@ pub fn part1(moves: &Vec<Vec<Direction>>) -> String {
|
|||
.collect()
|
||||
}
|
||||
|
||||
pub fn part2(moves: &Vec<Vec<Direction>>) -> String {
|
||||
pub fn part2(moves: &[Vec<Direction>]) -> String {
|
||||
let mut position = Position { x: 2, y: 0 };
|
||||
moves
|
||||
.iter()
|
||||
|
|
Loading…
Reference in New Issue