Advent of Code solutions
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

use include_str instead of reading the file

Rain 8c3865a6 cfd306f0

+2 -2
+1 -1
2025/1/src/main.rs
··· 86 86 } 87 87 88 88 fn main() { 89 - let file_contents = std::fs::read_to_string("input.txt").expect("unable to read file"); 89 + let file_contents = include_str!("../input.txt"); 90 90 let mut turns: Vec<(Direction, usize)> = Vec::new(); 91 91 for line in file_contents.lines() { 92 92 turns.push(parse(line));
+1 -1
2025/2/src/main.rs
··· 40 40 } 41 41 42 42 fn main() { 43 - let file_contents = std::fs::read_to_string("./input.txt").expect("unable to read file"); 43 + let file_contents = include_str!("../input.txt"); 44 44 let ranges: Vec<(usize, usize)> = file_contents 45 45 .trim_end() 46 46 .split(',')