2025 day1 part1

This commit is contained in:
Rakarake 2025-12-01 13:36:43 +01:00
parent e81fba0172
commit c1700fda5f
2 changed files with 64 additions and 0 deletions

View file

@ -1,3 +1,10 @@
use std::path::Path;
// Yoinked from https://github.com/loafey/advent_of_code/blob/master/utils/lib.rs
pub fn load_string<P: AsRef<Path>>(p: P) -> String {
std::fs::read_to_string(&p).unwrap_or_else(|_| panic!("failed to load {:?}", p.as_ref()))
}
pub trait Matrix {
fn transpose(self) -> Self;
fn reverse_rows(self) -> Self;