diff --git a/Cargo.toml b/Cargo.toml index d208614..fe402b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,6 @@ clap = { version = "4.0.29", features = ["derive"] } chrono = "0.4.31" anyhow = "1.0.75" - [profile.release] overflow-checks = true incremental = true diff --git a/aoc_2021/src/day_10.rs b/aoc_2021/src/day_10.rs index 19a5422..b2ab45c 100644 --- a/aoc_2021/src/day_10.rs +++ b/aoc_2021/src/day_10.rs @@ -52,7 +52,7 @@ fn part_b(input: &str) -> Answer { } if !is_corrupted { - let mut score = 0; + let mut score = 0u64; while let Some(ch) = queue.pop() { score = 5 * score + match ch { diff --git a/aoc_2022/src/day_19.rs b/aoc_2022/src/day_19.rs index 7c1bbcb..567aea2 100644 --- a/aoc_2022/src/day_19.rs +++ b/aoc_2022/src/day_19.rs @@ -47,7 +47,7 @@ impl State { fn tick(self) -> Self { let mut resources = self.resources; for (i, resource) in resources.iter_mut().enumerate() { - *resource += self.robots[i]; + *resource = resource.saturating_add(self.robots[i]); } Self { resources, ..self } diff --git a/aoc_2022/src/day_23.rs b/aoc_2022/src/day_23.rs index 9140c6f..de01b20 100644 --- a/aoc_2022/src/day_23.rs +++ b/aoc_2022/src/day_23.rs @@ -3,7 +3,7 @@ use hashbrown::{hash_map::Entry, HashMap, HashSet}; use common::{solution, Answer}; use nd_vec::vector; -solution!("Unstable Diffusion", 32); +solution!("Unstable Diffusion", 23); type Point = nd_vec::Vec2;