added template for AOC.
This commit is contained in:
commit
ea7220bb00
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
/target
|
42
Cargo.lock
generated
Normal file
42
Cargo.lock
generated
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
version = 3
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "advent_of_code_2022"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"regex",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "aho-corasick"
|
||||||
|
version = "0.7.20"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
|
||||||
|
dependencies = [
|
||||||
|
"memchr",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "memchr"
|
||||||
|
version = "2.5.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex"
|
||||||
|
version = "1.7.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a"
|
||||||
|
dependencies = [
|
||||||
|
"aho-corasick",
|
||||||
|
"memchr",
|
||||||
|
"regex-syntax",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "regex-syntax"
|
||||||
|
version = "0.6.28"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
|
14
Cargo.toml
Normal file
14
Cargo.toml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[package]
|
||||||
|
name = "advent_of_code_2022"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors=["Gabriel Venberg"]
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[[bin]]
|
||||||
|
name="template"
|
||||||
|
path="src/template/solve.rs"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
regex="1"
|
0
src/template/input.txt
Normal file
0
src/template/input.txt
Normal file
13
src/template/part1.rs
Normal file
13
src/template/part1.rs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
pub fn part1() -> usize {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod day01 {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_part1() {
|
||||||
|
assert_eq!(part1(), 0);
|
||||||
|
}
|
||||||
|
}
|
13
src/template/part2.rs
Normal file
13
src/template/part2.rs
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
pub fn part2() -> usize {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod day01 {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_part2() {
|
||||||
|
assert_eq!(part2(), 0);
|
||||||
|
}
|
||||||
|
}
|
12
src/template/solve.rs
Normal file
12
src/template/solve.rs
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
mod part1;
|
||||||
|
mod part2;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
let _input = include_str!("./input.txt");
|
||||||
|
|
||||||
|
println!("Part One");
|
||||||
|
println!("Result: {}", part1::part1());
|
||||||
|
|
||||||
|
println!("Part Two");
|
||||||
|
println!("Result: {}", part2::part2());
|
||||||
|
}
|
Loading…
Reference in a new issue