From 6d4f9b50c86f12dc14b7c8774b058f409b127b75 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 11 Dec 2024 11:34:34 +0000 Subject: [PATCH 1/3] Use u64 to represent solution Some puzzles have solutions which are too large for `u32`s. --- src/template.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/template.txt b/src/template.txt index 11344df..87eac99 100644 --- a/src/template.txt +++ b/src/template.txt @@ -1,10 +1,10 @@ advent_of_code::solution!(%DAY_NUMBER%); -pub fn part_one(input: &str) -> Option { +pub fn part_one(input: &str) -> Option { None } -pub fn part_two(input: &str) -> Option { +pub fn part_two(input: &str) -> Option { None } From 8d92a20cde8439c8fad6ed579cc580e2dc253bba Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 11 Dec 2024 11:38:45 +0000 Subject: [PATCH 2/3] Remove warning in README --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index a155efa..9ff5201 100644 --- a/README.md +++ b/README.md @@ -286,10 +286,6 @@ A curated list of popular crates can be found on [blessred.rs](https://blessed.r Do you have aoc-specific crate recommendations? [Share them!](https://github.com/fspoettel/advent-of-code-rust/edit/main/README.md) -## Common pitfalls - -- **Integer overflows:** This template uses 32-bit integers by default because it is generally faster - for example when packed in large arrays or structs - than using 64-bit integers everywhere. For some problems, solutions for real input might exceed 32-bit integer space. While this is checked and panics in `debug` mode, integers [wrap](https://doc.rust-lang.org/book/ch03-02-data-types.html#integer-overflow) in `release` mode, leading to wrong output when running your solution. - ## Footnotes [^1]: The session cookie might expire after a while (~1 month) which causes the downloads to fail. To fix this issue, refresh the `.adventofcode.session` file. From 1f140f60478b5c8d19529d8d94e1ad1861331456 Mon Sep 17 00:00:00 2001 From: Penelope Yong Date: Wed, 11 Dec 2024 11:41:45 +0000 Subject: [PATCH 3/3] Fix a README typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9ff5201..e3db903 100644 --- a/README.md +++ b/README.md @@ -282,7 +282,7 @@ You can pass the report a tool like [dh-view](https://nnethercote.github.io/dh_v - [itertools](https://crates.io/crates/itertools): Extends iterators with extra methods and adaptors. Frequently useful for aoc puzzles. - [regex](https://crates.io/crates/regex): Official regular expressions implementation for Rust. -A curated list of popular crates can be found on [blessred.rs](https://blessed.rs/crates). +A curated list of popular crates can be found on [blessed.rs](https://blessed.rs/crates). Do you have aoc-specific crate recommendations? [Share them!](https://github.com/fspoettel/advent-of-code-rust/edit/main/README.md)