Skip to content

Commit 20d2f6e

Browse files
committed
chore(23/2024): add day boilerplate
1 parent 2d1fd55 commit 20d2f6e

File tree

4 files changed

+30
-5
lines changed

4 files changed

+30
-5
lines changed

Cargo.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ edition = "2021"
77

88
[dependencies]
99
aoc-client = "0.2.0"
10-
clap = { version = "4.5.21", features = ["derive"]}
10+
clap = { version = "4.5.21", features = ["derive"] }
1111
dotenv = "0.15.0"
1212
regex = "1.11.1"
13-
itertools = "0.13.0"
14-
15-
[dev-dependencies]
16-
test-case = "3.3.1"
13+
itertools = "0.13.0"

src/solutions/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pub fn solution(day: DayNumber, year: Year) -> Box<dyn Solution> {
3535
20 => Box::new(year2024::day20::Day20),
3636
21 => Box::new(year2024::day21::Day21),
3737
22 => Box::new(year2024::day22::Day22),
38+
23 => Box::new(year2024::day23::Day23),
3839
_ => panic!("Day not exist"),
3940
},
4041
Year::Year2023 => match i {

src/solutions/year2024/day23.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
use crate::solutions::Solution;
2+
3+
pub struct Day23;
4+
5+
impl Solution for Day23 {
6+
fn part_one(&self, _input: &str) -> String {
7+
String::from("0")
8+
}
9+
10+
fn part_two(&self, _input: &str) -> String {
11+
String::from("0")
12+
}
13+
}
14+
15+
#[cfg(test)]
16+
mod tests {
17+
use crate::solutions::year2024::day23::Day23;
18+
use crate::solutions::Solution;
19+
20+
const EXAMPLE: &str = r#""#;
21+
22+
#[test]
23+
fn part_one_example() {
24+
assert_eq!("0", Day23.part_one(EXAMPLE));
25+
}
26+
}

src/solutions/year2024/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ pub mod day19;
1919
pub mod day20;
2020
pub mod day21;
2121
pub mod day22;
22+
pub mod day23;

0 commit comments

Comments
 (0)