From 93975465aeec4582ea23f3194ee25745d16dc473 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 1 Dec 2022 17:27:58 -0600 Subject: [PATCH] Add compete details --- 2022/rust/readme.md | 10 ++++++++++ 2022/rust/src/day2.rs | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/2022/rust/readme.md b/2022/rust/readme.md index 8a76e0d..8899476 100644 --- a/2022/rust/readme.md +++ b/2022/rust/readme.md @@ -5,6 +5,14 @@ really enjoyed the tooling. I intent to do more with Rust this year than last and aim for good performance (without bending over too far backwards, anyways...) +## Competing + +I compete very lightly. I use [my `at` script][at] like `at 2022-12-02 && ./ +fetch_input.sh 2` to fetch input as soon as it's available and I use `watchexec +-e rs 'C; clear; cargo test --bin day2 && cargo run --bin day2'` to run my +file(s) as I edit them. + + ## Running First, you will want to fetch your input for the day you want to run. You will @@ -37,3 +45,5 @@ For speeeeeed! cargo build --release --bin day1 time ./target/release/day1 ``` + +[at]: https://git.lyte.dev/lytedev/dotfiles/src/branch/master/common/bin/at diff --git a/2022/rust/src/day2.rs b/2022/rust/src/day2.rs index 8780c01..630a235 100644 --- a/2022/rust/src/day2.rs +++ b/2022/rust/src/day2.rs @@ -22,11 +22,11 @@ mod tests { #[test] fn test_part1() { - assert_eq!(part1(TEST_INPUT), 0) + assert_eq!(part1(TEST_INPUT), 10000) } #[test] fn test_part2() { - assert_eq!(part2(TEST_INPUT), 0) + assert_eq!(part2(TEST_INPUT), 10000) } }