2025 day1 part1
This commit is contained in:
parent
e81fba0172
commit
c1700fda5f
2 changed files with 64 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue