+1
2025/2/src/main.rs
+1
2025/2/src/main.rs
···
42
42
fn main() {
43
43
let file_contents = std::fs::read_to_string("./input.txt").expect("unable to read file");
44
44
let ranges: Vec<(usize, usize)> = file_contents
45
+
.trim_end()
45
46
.split(',')
46
47
.map(|r| r.split_once('-').unwrap())
47
48
.map(|(lhs, rhs)| (lhs.parse::<usize>().unwrap(), rhs.parse::<usize>().unwrap()))