clippy + remove debug

This commit is contained in:
Pedro de Oliveira 2023-05-05 19:37:39 +01:00
parent 1484319343
commit 8b467093c9
2 changed files with 2 additions and 6 deletions

View File

@ -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,

View File

@ -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()