From 000001203965e5655384954437ef0ac03925691d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Sat, 3 Dec 2022 20:19:38 +0100 Subject: [PATCH] feat: add hashbrown --- Cargo.lock | 29 ++++++++++++++++++++++++++++- Cargo.toml | 1 + src/bin/03.rs | 2 +- src/bin/06.rs | 2 +- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c188d77..55fc363 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,17 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "ahash" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf6ccdb167abbf410dcb915cabd428929d7f6a04980b54a11f26a39f1c7f7107" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" version = "0.7.20" @@ -16,6 +27,7 @@ name = "aoc" version = "0.1.0" dependencies = [ "dotenv", + "hashbrown 0.13.1", "hex-literal", "itertools", "lazy_static", @@ -228,6 +240,15 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038" +dependencies = [ + "ahash", +] + [[package]] name = "hermit-abi" version = "0.1.19" @@ -331,7 +352,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", ] [[package]] @@ -932,6 +953,12 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + [[package]] name = "want" version = "0.3.0" diff --git a/Cargo.toml b/Cargo.toml index dffc2e1..0b40970 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ default-run = "aoc" [dependencies] dotenv = "0.15.0" +hashbrown = "0.13.1" hex-literal = "0.3.4" itertools = "0.10.5" lazy_static = "1.4.0" diff --git a/src/bin/03.rs b/src/bin/03.rs index d150356..4dca334 100644 --- a/src/bin/03.rs +++ b/src/bin/03.rs @@ -1,4 +1,4 @@ -use std::collections::HashSet; +use hashbrown::HashSet; use itertools::Itertools; diff --git a/src/bin/06.rs b/src/bin/06.rs index 5cd82a4..c84c85e 100644 --- a/src/bin/06.rs +++ b/src/bin/06.rs @@ -1,4 +1,4 @@ -use std::collections::HashMap; +use hashbrown::HashMap; use lazy_static::lazy_static; use regex::Regex;