We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f178be6 commit 30e4e15Copy full SHA for 30e4e15
benches/benchmark.rs
@@ -8,15 +8,14 @@ macro_rules! benchmark {
8
mod $day {
9
use aoc::$year::$day::*;
10
use std::fs::read_to_string;
11
- use std::path::Path;
12
use std::sync::LazyLock;
13
use test::Bencher;
14
15
static DATA: LazyLock<String> = LazyLock::new(|| {
16
let year = stringify!($year);
17
let day = stringify!($day);
18
- let path = Path::new("input").join(year).join(day).with_extension("txt");
19
- read_to_string(path).unwrap()
+ let path = format!("input/{year}/{day}.txt");
+ read_to_string(&path).expect(&path)
20
});
21
22
#[bench]
0 commit comments