feat: fixup template errors
This commit is contained in:
@@ -24,12 +24,12 @@ mod tests {
|
|||||||
use super::*;
|
use super::*;
|
||||||
#[test]
|
#[test]
|
||||||
fn test_part_one() {
|
fn test_part_one() {
|
||||||
let input = aoc::read_file("examples", DAY).trim();
|
let input = aoc::read_file("examples", DAY);
|
||||||
assert_eq!(part_one(&input), None);
|
assert_eq!(part_one(&input), None);
|
||||||
}
|
}
|
||||||
#[test]
|
#[test]
|
||||||
fn test_part_two() {
|
fn test_part_two() {
|
||||||
let input = aoc::read_file("examples", DAY).trim();
|
let input = aoc::read_file("examples", DAY);
|
||||||
assert_eq!(part_two(&input), None);
|
assert_eq!(part_two(&input), None);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ pub fn read_file(folder: &str, day: u8) -> String {
|
|||||||
let filepath = cwd.join("src").join(folder).join(format!("{day:02}.txt"));
|
let filepath = cwd.join("src").join(folder).join(format!("{day:02}.txt"));
|
||||||
|
|
||||||
let f = fs::read_to_string(filepath);
|
let f = fs::read_to_string(filepath);
|
||||||
f.expect("could not open input file")
|
f.expect("could not open input file").trim().to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_time(val: &str, postfix: &str) -> f64 {
|
fn parse_time(val: &str, postfix: &str) -> f64 {
|
||||||
|
|||||||
Reference in New Issue
Block a user