2022 rust day 14

This commit is contained in:
Maciej Jur 2022-12-14 20:09:05 +01:00
parent e5f0094981
commit 25c441bbf4

View file

@ -1,5 +1,4 @@
#![allow(dead_code)]
use std::fmt::{Display, Formatter};
use regex::Regex;
use crate::utils;
use crate::utils::matrix::Matrix;
@ -18,17 +17,6 @@ pub fn run() -> () {
#[derive(Copy, Clone, PartialEq)]
enum Tile { Empty, Rock, Sand }
impl Display for Tile {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
Tile::Empty => write!(f, ".")?,
Tile::Rock => write!(f, "#")?,
Tile::Sand => write!(f, "o")?,
};
Ok(())
}
}
fn get_data_bounds(data: &[Vec<(usize, usize)>]) -> (usize, (usize, usize)) {
data.iter()