advent_2025/src/main.rs
2024-12-06 17:16:21 +03:00

27 lines
480 B
Rust

mod day1;
mod day2;
mod day3;
mod day4;
mod day5;
mod day6;
use std::{
fs::File,
io::{BufRead as _, BufReader},
};
fn get_lines(name: &str) -> impl Iterator<Item = String> {
BufReader::new(File::open(name).unwrap())
.lines()
.map(|line| line.unwrap())
}
fn parse_line(line: &str, pattern: char) -> impl Iterator<Item = i32> + '_ {
line.trim().split(pattern).map(|num| num.parse().unwrap())
}
fn main() {
day6::task1();
day6::task2();
}