Skip to content

Commit 7a43fe7

Browse files
committed
chore(04/2015): init day
1 parent bebf7a5 commit 7a43fe7

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
| [Day 1: Not Quite Lisp](src/solutions/year2015/day01.rs) | ⭐⭐ | 0.013 | 0.001 |
9191
| [Day 2: I Was Told There Would Be No Math](src/solutions/year2015/day02.rs) | ⭐⭐ | 0.074 | 0.105 |
9292
| [Day 3: Perfectly Spherical Houses in a Vacuum](src/solutions/year2015/day03.rs) | ⭐⭐ | 0.358 | 0.373 |
93+
| [Day 4: The Ideal Stocking Stuffer](src/solutions/year2015/day04.rs) | | - | - |
9394

9495
# TODO
9596

src/solutions/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ pub fn solution(puzzle_day: PuzzleDay) -> Box<dyn Solution> {
8888
1 => Box::new(year2015::day01::Day01),
8989
2 => Box::new(year2015::day02::Day02),
9090
3 => Box::new(year2015::day03::Day03),
91+
4 => Box::new(year2015::day04::Day04),
9192
_ => panic!("Day not exist"),
9293
},
9394
}

src/solutions/year2015/day04.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
use crate::solutions::Solution;
2+
3+
pub struct Day04;
4+
5+
impl Solution for Day04 {
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 super::*;
18+
19+
#[test]
20+
fn part_one_example_test() {
21+
assert_eq!("0", Day04.part_one(""));
22+
}
23+
}

src/solutions/year2015/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
pub mod day01;
22
pub mod day02;
33
pub mod day03;
4+
pub mod day04;

0 commit comments

Comments
 (0)