Skip to content

Commit aafcbcd

Browse files
committed
Start on new solution system without dynamic dispatch
1 parent df3c817 commit aafcbcd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+260
-259
lines changed

aoc_2021/src/day_01.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use common::{Answer, Solution};
1+
use common::{Answer, ISolution};
22

33
pub struct Day01;
44

5-
impl Solution for Day01 {
5+
impl ISolution for Day01 {
66
fn name(&self) -> &'static str {
77
"Sonar Sweep"
88
}

aoc_2021/src/day_02.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use common::{Answer, Solution};
1+
use common::{Answer, ISolution};
22

33
pub struct Day02;
44

5-
impl Solution for Day02 {
5+
impl ISolution for Day02 {
66
fn name(&self) -> &'static str {
77
"Dive!"
88
}

aoc_2021/src/day_03.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use common::{Answer, Solution};
1+
use common::{Answer, ISolution};
22

33
pub struct Day03;
44

5-
impl Solution for Day03 {
5+
impl ISolution for Day03 {
66
fn name(&self) -> &'static str {
77
"Binary Diagnostic"
88
}

aoc_2021/src/day_04.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use common::{Answer, Solution};
1+
use common::{Answer, ISolution};
22

33
pub struct Day04;
44

5-
impl Solution for Day04 {
5+
impl ISolution for Day04 {
66
fn name(&self) -> &'static str {
77
"Giant Squid"
88
}

aoc_2021/src/day_05.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
use common::{Answer, Solution};
1+
use common::{Answer, ISolution};
22

33
use hashbrown::HashMap;
44

55
pub struct Day05;
66

7-
impl Solution for Day05 {
7+
impl ISolution for Day05 {
88
fn name(&self) -> &'static str {
99
"Hydrothermal Venture"
1010
}

aoc_2021/src/day_06.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
use common::{Answer, Solution};
1+
use common::{Answer, ISolution};
22

33
use std::hash::Hash;
44

55
use hashbrown::HashMap;
66

77
pub struct Day06;
88

9-
impl Solution for Day06 {
9+
impl ISolution for Day06 {
1010
fn name(&self) -> &'static str {
1111
"Lanternfish"
1212
}

aoc_2021/src/day_07.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use common::{Answer, Solution};
1+
use common::{Answer, ISolution};
22

33
pub struct Day07;
44

5-
impl Solution for Day07 {
5+
impl ISolution for Day07 {
66
fn name(&self) -> &'static str {
77
"The Treachery of Whales"
88
}

aoc_2021/src/day_08.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use common::{Answer, Solution};
1+
use common::{Answer, ISolution};
22

33
use hashbrown::HashMap;
44

@@ -10,7 +10,7 @@ const DIGITS: [&str; 10] = [
1010

1111
pub struct Day08;
1212

13-
impl Solution for Day08 {
13+
impl ISolution for Day08 {
1414
fn name(&self) -> &'static str {
1515
"Seven Segment Search"
1616
}

aoc_2021/src/day_09.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
use common::{Answer, Solution};
1+
use common::{Answer, ISolution};
22

33
pub struct Day09;
44

5-
impl Solution for Day09 {
5+
impl ISolution for Day09 {
66
fn name(&self) -> &'static str {
77
"Smoke Basin"
88
}

aoc_2021/src/day_10.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
use common::{Answer, Solution};
1+
use common::{Answer, ISolution};
22

33
const CHARS: [(char, char); 4] = [('(', ')'), ('[', ']'), ('{', '}'), ('<', '>')];
44

55
pub struct Day10;
66

7-
impl Solution for Day10 {
7+
impl ISolution for Day10 {
88
fn name(&self) -> &'static str {
99
"Syntax Scoring"
1010
}

0 commit comments

Comments
 (0)