From de9a626ee292550fd421b867d6b0a738a1d6d479 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 04:31:40 +0000 Subject: [PATCH 001/142] Bump serde from 1.0.142 to 1.0.144 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.142 to 1.0.144. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.142...v1.0.144) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d321d1c..c46a1ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -230,9 +230,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.142" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e590c437916fb6b221e1d00df6e3294f3fccd70ca7e92541c475d6ed6ef5fee2" +checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index 23a3216..bbc5a28 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.5.3" regex = "1" -serde = "1.0.142" +serde = "1.0.144" serde_derive = "1.0.143" toml = "0.5.9" unicode-segmentation = "1.9.0" \ No newline at end of file From a9592af87abfed0bdac4205d94ed88e0b718cf01 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 04:35:07 +0000 Subject: [PATCH 002/142] Bump serde_derive from 1.0.143 to 1.0.144 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.143 to 1.0.144. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.143...v1.0.144) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c46a1ec..11e22d5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,9 +236,9 @@ checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" [[package]] name = "serde_derive" -version = "1.0.143" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3d8e8de557aee63c26b85b947f5e59b690d0454c753f3adeb5cd7835ab88391" +checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index bbc5a28..26bcc90 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,6 @@ lazy_static = "1.4.0" rayon = "1.5.3" regex = "1" serde = "1.0.144" -serde_derive = "1.0.143" +serde_derive = "1.0.144" toml = "0.5.9" unicode-segmentation = "1.9.0" \ No newline at end of file From 384ccf39509a074027eee421cce8bff9b9ac395d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 04:38:45 +0000 Subject: [PATCH 003/142] Bump unicode-segmentation from 1.9.0 to 1.10.0 Bumps [unicode-segmentation](https://github.com/unicode-rs/unicode-segmentation) from 1.9.0 to 1.10.0. - [Release notes](https://github.com/unicode-rs/unicode-segmentation/releases) - [Commits](https://github.com/unicode-rs/unicode-segmentation/commits/v1.10.0) --- updated-dependencies: - dependency-name: unicode-segmentation dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 11e22d5..2df6fdd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -273,6 +273,6 @@ checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" [[package]] name = "unicode-segmentation" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" +checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" diff --git a/Cargo.toml b/Cargo.toml index 26bcc90..a7bdc7c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,4 +14,4 @@ regex = "1" serde = "1.0.144" serde_derive = "1.0.144" toml = "0.5.9" -unicode-segmentation = "1.9.0" \ No newline at end of file +unicode-segmentation = "1.10.0" \ No newline at end of file From 8a48d24f89c38c06659d8465f092830e79a81366 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 05:08:29 +0000 Subject: [PATCH 004/142] Bump serde from 1.0.144 to 1.0.145 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.144 to 1.0.145. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.144...v1.0.145) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2df6fdd..4927c31 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -230,9 +230,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.144" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" +checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index a7bdc7c..3668625 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.5.3" regex = "1" -serde = "1.0.144" +serde = "1.0.145" serde_derive = "1.0.144" toml = "0.5.9" unicode-segmentation = "1.10.0" \ No newline at end of file From 71e1adffbbcb11632fb8f168eccb97a4ce885872 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 27 Sep 2022 04:23:38 +0000 Subject: [PATCH 005/142] Bump serde_derive from 1.0.144 to 1.0.145 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.144 to 1.0.145. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.144...v1.0.145) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4927c31..5892ab5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,9 +236,9 @@ checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" [[package]] name = "serde_derive" -version = "1.0.144" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" +checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 3668625..ab87c06 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,6 @@ lazy_static = "1.4.0" rayon = "1.5.3" regex = "1" serde = "1.0.145" -serde_derive = "1.0.144" +serde_derive = "1.0.145" toml = "0.5.9" unicode-segmentation = "1.10.0" \ No newline at end of file From ecae9a1cefa29ad88ed7a3b8ee23c64ebb83e816 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 05:09:16 +0000 Subject: [PATCH 006/142] Bump serde from 1.0.145 to 1.0.147 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.145 to 1.0.147. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.145...v1.0.147) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5892ab5..0af6bf1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -230,9 +230,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.145" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" +checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index ab87c06..153c444 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.5.3" regex = "1" -serde = "1.0.145" +serde = "1.0.147" serde_derive = "1.0.145" toml = "0.5.9" unicode-segmentation = "1.10.0" \ No newline at end of file From 7df82b31d4ec61ee874ed8e85262f3e8157dbd1a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Oct 2022 04:13:22 +0000 Subject: [PATCH 007/142] Bump serde_derive from 1.0.145 to 1.0.147 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.145 to 1.0.147. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.145...v1.0.147) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0af6bf1..9dfe018 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -236,9 +236,9 @@ checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" [[package]] name = "serde_derive" -version = "1.0.145" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" +checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 153c444..b027442 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,6 @@ lazy_static = "1.4.0" rayon = "1.5.3" regex = "1" serde = "1.0.147" -serde_derive = "1.0.145" +serde_derive = "1.0.147" toml = "0.5.9" unicode-segmentation = "1.10.0" \ No newline at end of file From 4b39b113f3d6bba66b14b98fffa1d2e089bc3c7e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Nov 2022 05:03:37 +0000 Subject: [PATCH 008/142] Bump regex from 1.6.0 to 1.7.0 Bumps [regex](https://github.com/rust-lang/regex) from 1.6.0 to 1.7.0. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.6.0...1.7.0) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9dfe018..f846473 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -207,9 +207,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" +checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" dependencies = [ "aho-corasick", "memchr", From 2c075462c1fe7740c977d6e368e7208d2489992d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Nov 2022 05:03:12 +0000 Subject: [PATCH 009/142] Bump serde from 1.0.147 to 1.0.148 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.147 to 1.0.148. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.147...v1.0.148) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f846473..6a0acce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -230,9 +230,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.147" +version = "1.0.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" +checksum = "e53f64bb4ba0191d6d0676e1b141ca55047d83b74f5607e6d8eb88126c52c2dc" [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index b027442..522885d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.5.3" regex = "1" -serde = "1.0.147" +serde = "1.0.148" serde_derive = "1.0.147" toml = "0.5.9" unicode-segmentation = "1.10.0" \ No newline at end of file From 03bb05779c51a8c43940abdff8e6547dd5f3e87a Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Tue, 29 Nov 2022 20:42:48 -0800 Subject: [PATCH 010/142] Fix clippy errors --- .github/workflows/ci.yml | 2 +- .gitignore | 3 +++ src/day10.rs | 4 ++-- src/day11.rs | 4 +--- src/day19.rs | 8 ++++---- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee304ee..add4b90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,6 @@ jobs: - name: Build run: cargo build --locked --verbose - name: Lint - run: cargo clippy --all-targets --all-features -- -D warnings + run: cargo clippy - name: Run tests run: cargo test --verbose diff --git a/.gitignore b/.gitignore index 67f7931..f84186c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ /target .idea config.toml +.DS_Store +.project +input diff --git a/src/day10.rs b/src/day10.rs index 524be58..a4db039 100644 --- a/src/day10.rs +++ b/src/day10.rs @@ -49,10 +49,10 @@ pub fn count_adapter_arrangements( } if adapters.is_empty() { - return if from + 3 == to { 1 } else { 0 }; + return u64::from(from + 3 == to); } else if adapters.len() == 1 { let last = adapters[0]; - return if last == to - 3 { 1 } else { 0 }; + return u64::from(last == to - 3); } let mut retval = 0u64; diff --git a/src/day11.rs b/src/day11.rs index 8f68dd1..5286490 100644 --- a/src/day11.rs +++ b/src/day11.rs @@ -37,9 +37,7 @@ impl FromStr for Position { pub fn read_seat_layout() -> Vec> { get_lines("day-11-input.txt") .map(|line| -> Vec { - line.graphemes(true) - .flat_map(Position::from_str) - .collect() + line.graphemes(true).flat_map(Position::from_str).collect() }) .collect() } diff --git a/src/day19.rs b/src/day19.rs index a2e7308..431384f 100644 --- a/src/day19.rs +++ b/src/day19.rs @@ -120,7 +120,7 @@ impl FromStr for Rule { } s.chars().next() }) - .expect(&*format!("Error parsing character: {}", s)); + .unwrap_or_else(|| panic!("Error parsing character: {}", s)); Ok(MatchSingleCharacter(c)) } else if s.contains(" | ") { let potential_rule_sets = s @@ -131,7 +131,7 @@ impl FromStr for Rule { .split(' ') .map(|c| { c.parse::() - .expect(&*format!("Invalid rule ID: {}", c)) + .unwrap_or_else(|_| panic!("Invalid rule ID: {}", c)) }) .collect::>() }) @@ -154,7 +154,7 @@ fn parse_rule(string: &str) -> (usize, Rule) { let id = id_string .trim() .parse::() - .expect(&*format!("Unparseable id: {}", id_string)); + .unwrap_or_else(|_| panic!("Unparseable id: {}", id_string)); if let Some(value_string) = sections.next() { let value_string = value_string.trim(); if let Ok(rule) = Rule::from_str(value_string) { @@ -183,7 +183,7 @@ pub fn get_input() -> (HashMap, Vec) { continue; } if section == 0 { - let (id, rule) = parse_rule(&*line); + let (id, rule) = parse_rule(&line); rules.insert(id, rule); } else if section == 1 { messages.push(line); From 771b56ad550257531f6f2f4b6fe84d6fd1c4004f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Nov 2022 04:48:23 +0000 Subject: [PATCH 011/142] Bump serde_derive from 1.0.147 to 1.0.148 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.147 to 1.0.148. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.147...v1.0.148) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6a0acce..2711d9a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -165,9 +165,9 @@ checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] name = "proc-macro2" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ "unicode-ident", ] @@ -236,9 +236,9 @@ checksum = "e53f64bb4ba0191d6d0676e1b141ca55047d83b74f5607e6d8eb88126c52c2dc" [[package]] name = "serde_derive" -version = "1.0.147" +version = "1.0.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" +checksum = "a55492425aa53521babf6137309e7d34c20bbfbbfcfe2c7f3a047fd1f6b92c0c" dependencies = [ "proc-macro2", "quote", @@ -247,9 +247,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.98" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" +checksum = "4ae548ec36cf198c0ef7710d3c230987c2d6d7bd98ad6edc0274462724c585ce" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 522885d..b9326aa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,6 @@ lazy_static = "1.4.0" rayon = "1.5.3" regex = "1" serde = "1.0.148" -serde_derive = "1.0.147" +serde_derive = "1.0.148" toml = "0.5.9" unicode-segmentation = "1.10.0" \ No newline at end of file From 1f485271205638d4f1e8bc3f7b17c2e42a5fbeef Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Tue, 29 Nov 2022 20:46:38 -0800 Subject: [PATCH 012/142] Update GitHub Actions --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index add4b90..52f642a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,8 +15,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v2 + - uses: actions/checkout@v3 + - uses: actions/cache@v3 with: path: | ~/.cargo/registry From 4a46520526cd990f058b84e964a061a12bdc8e43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Nov 2022 04:53:55 +0000 Subject: [PATCH 013/142] Bump rayon from 1.5.3 to 1.6.0 Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.5.3 to 1.6.0. - [Release notes](https://github.com/rayon-rs/rayon/releases) - [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md) - [Commits](https://github.com/rayon-rs/rayon/compare/v1.5.3...rayon-core-v1.6.0) --- updated-dependencies: - dependency-name: rayon dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 9 ++++----- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2711d9a..8befc45 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -183,11 +183,10 @@ dependencies = [ [[package]] name = "rayon" -version = "1.5.3" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" +checksum = "1e060280438193c554f654141c9ea9417886713b7acd75974c85b18a69a88e0b" dependencies = [ - "autocfg", "crossbeam-deque", "either", "rayon-core", @@ -195,9 +194,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.9.3" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" +checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" dependencies = [ "crossbeam-channel", "crossbeam-deque", diff --git a/Cargo.toml b/Cargo.toml index b9326aa..a2663a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] hashers = "1.0.1" lazy_static = "1.4.0" -rayon = "1.5.3" +rayon = "1.6.0" regex = "1" serde = "1.0.148" serde_derive = "1.0.148" From 85cc523d1684ca9373729b0e35789c4ddc937fbd Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Tue, 29 Nov 2022 21:20:14 -0800 Subject: [PATCH 014/142] Prepare for 2022 --- Cargo.lock | 1 - Cargo.toml | 1 - README.md | 4 +- sample/day-1-input.txt | 6 - sample/day-10-input.txt | 31 -- sample/day-11-input.txt | 10 - sample/day-12-input.txt | 5 - sample/day-13-input.txt | 2 - sample/day-14-input.txt | 4 - sample/day-15-input.txt | 1 - sample/day-16-input.txt | 12 - sample/day-17-input.txt | 3 - sample/day-18-input.txt | 4 - sample/day-19-input.txt | 12 - sample/day-2-input.txt | 3 - sample/day-20-input.txt | 108 ------- sample/day-21-input.txt | 4 - sample/day-22-input.txt | 13 - sample/day-23-input.txt | 1 - sample/day-24-input.txt | 20 -- sample/day-3-input.txt | 11 - sample/day-4-input.txt | 13 - sample/day-5-input.txt | 4 - sample/day-6-input.txt | 15 - sample/day-7-input.txt | 9 - sample/day-8-input.txt | 9 - sample/day-9-input.txt | 40 --- src/day01.rs | 61 +--- src/day02.rs | 109 ------- src/day03.rs | 99 ------ src/day04.rs | 118 ------- src/day05.rs | 79 ----- src/day06.rs | 58 ---- src/day07.rs | 134 -------- src/day08.rs | 192 ------------ src/day09.rs | 97 ------ src/day10.rs | 123 -------- src/day11.rs | 384 ----------------------- src/day12.rs | 360 --------------------- src/day13.rs | 263 ---------------- src/day14.rs | 272 ---------------- src/day15.rs | 133 -------- src/day16.rs | 256 --------------- src/day17.rs | 431 ------------------------- src/day18.rs | 242 -------------- src/day19.rs | 224 ------------- src/day20.rs | 680 ---------------------------------------- src/day21.rs | 194 ------------ src/day22.rs | 192 ------------ src/day23.rs | 111 ------- src/lib.rs | 25 -- 51 files changed, 11 insertions(+), 5172 deletions(-) delete mode 100644 sample/day-1-input.txt delete mode 100644 sample/day-10-input.txt delete mode 100644 sample/day-11-input.txt delete mode 100644 sample/day-12-input.txt delete mode 100644 sample/day-13-input.txt delete mode 100644 sample/day-14-input.txt delete mode 100644 sample/day-15-input.txt delete mode 100644 sample/day-16-input.txt delete mode 100644 sample/day-17-input.txt delete mode 100644 sample/day-18-input.txt delete mode 100644 sample/day-19-input.txt delete mode 100644 sample/day-2-input.txt delete mode 100644 sample/day-20-input.txt delete mode 100644 sample/day-21-input.txt delete mode 100644 sample/day-22-input.txt delete mode 100644 sample/day-23-input.txt delete mode 100644 sample/day-24-input.txt delete mode 100644 sample/day-3-input.txt delete mode 100644 sample/day-4-input.txt delete mode 100644 sample/day-5-input.txt delete mode 100644 sample/day-6-input.txt delete mode 100644 sample/day-7-input.txt delete mode 100644 sample/day-8-input.txt delete mode 100644 sample/day-9-input.txt delete mode 100644 src/day02.rs delete mode 100644 src/day03.rs delete mode 100644 src/day04.rs delete mode 100644 src/day05.rs delete mode 100644 src/day06.rs delete mode 100644 src/day07.rs delete mode 100644 src/day08.rs delete mode 100644 src/day09.rs delete mode 100644 src/day10.rs delete mode 100644 src/day11.rs delete mode 100644 src/day12.rs delete mode 100644 src/day13.rs delete mode 100644 src/day14.rs delete mode 100644 src/day15.rs delete mode 100644 src/day16.rs delete mode 100644 src/day17.rs delete mode 100644 src/day18.rs delete mode 100644 src/day19.rs delete mode 100644 src/day20.rs delete mode 100644 src/day21.rs delete mode 100644 src/day22.rs delete mode 100644 src/day23.rs diff --git a/Cargo.lock b/Cargo.lock index 8befc45..708f578 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7,7 +7,6 @@ name = "advent-of-code" version = "0.2020.0" dependencies = [ "hashers", - "lazy_static", "rayon", "regex", "serde", diff --git a/Cargo.toml b/Cargo.toml index a2663a6..2d9b969 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,6 @@ edition = "2018" [dependencies] hashers = "1.0.1" -lazy_static = "1.4.0" rayon = "1.6.0" regex = "1" serde = "1.0.148" diff --git a/README.md b/README.md index 93ee912..0cfa812 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# Advent of Code 2020 (Rust) +# Advent of Code 2022 (Rust) ## Other Editions -* 2020 Advent of Code ([Java](https://github.com/l0s/advent-of-code-java)) +* 2020 Advent of Code ([Java](https://github.com/l0s/advent-of-code-java/tree/2020)|[Rust](https://github.com/l0s/advent-of-code-rust/releases/tag/y2020)) diff --git a/sample/day-1-input.txt b/sample/day-1-input.txt deleted file mode 100644 index e3fb011..0000000 --- a/sample/day-1-input.txt +++ /dev/null @@ -1,6 +0,0 @@ -1721 -979 -366 -299 -675 -1456 diff --git a/sample/day-10-input.txt b/sample/day-10-input.txt deleted file mode 100644 index be5c492..0000000 --- a/sample/day-10-input.txt +++ /dev/null @@ -1,31 +0,0 @@ -28 -33 -18 -42 -31 -14 -46 -20 -48 -47 -24 -23 -49 -45 -19 -38 -39 -11 -1 -32 -25 -35 -8 -17 -7 -9 -4 -2 -34 -10 -3 \ No newline at end of file diff --git a/sample/day-11-input.txt b/sample/day-11-input.txt deleted file mode 100644 index 1beaede..0000000 --- a/sample/day-11-input.txt +++ /dev/null @@ -1,10 +0,0 @@ -L.LL.LL.LL -LLLLLLL.LL -L.L.L..L.. -LLLL.LL.LL -L.LL.LL.LL -L.LLLLL.LL -..L.L..... -LLLLLLLLLL -L.LLLLLL.L -L.LLLLL.LL diff --git a/sample/day-12-input.txt b/sample/day-12-input.txt deleted file mode 100644 index d382291..0000000 --- a/sample/day-12-input.txt +++ /dev/null @@ -1,5 +0,0 @@ -F10 -N3 -F7 -R90 -F11 diff --git a/sample/day-13-input.txt b/sample/day-13-input.txt deleted file mode 100644 index d76f619..0000000 --- a/sample/day-13-input.txt +++ /dev/null @@ -1,2 +0,0 @@ -939 -7,13,x,x,59,x,31,19 diff --git a/sample/day-14-input.txt b/sample/day-14-input.txt deleted file mode 100644 index b4b4e06..0000000 --- a/sample/day-14-input.txt +++ /dev/null @@ -1,4 +0,0 @@ -mask = 000000000000000000000000000000X1001X -mem[42] = 100 -mask = 00000000000000000000000000000000X0XX -mem[26] = 1 \ No newline at end of file diff --git a/sample/day-15-input.txt b/sample/day-15-input.txt deleted file mode 100644 index c84ffe7..0000000 --- a/sample/day-15-input.txt +++ /dev/null @@ -1 +0,0 @@ -0,3,6 diff --git a/sample/day-16-input.txt b/sample/day-16-input.txt deleted file mode 100644 index 29738e6..0000000 --- a/sample/day-16-input.txt +++ /dev/null @@ -1,12 +0,0 @@ -departure: 1-3 or 5-7 -row: 6-11 or 33-44 -seat: 13-40 or 45-50 - -your ticket: -7,1,14 - -nearby tickets: -7,3,47 -40,4,50 -55,2,20 -38,6,12 diff --git a/sample/day-17-input.txt b/sample/day-17-input.txt deleted file mode 100644 index eedd3d2..0000000 --- a/sample/day-17-input.txt +++ /dev/null @@ -1,3 +0,0 @@ -.#. -..# -### diff --git a/sample/day-18-input.txt b/sample/day-18-input.txt deleted file mode 100644 index 9e1ad36..0000000 --- a/sample/day-18-input.txt +++ /dev/null @@ -1,4 +0,0 @@ -2 * 3 + (4 * 5) -5 + (8 * 3 + 9 + 3 * 4 * 3) -5 * 9 * (7 * 3 * 3 + 9 * 3 + (8 + 6 * 4)) -((2 + 4 * 9) * (6 + 9 * 8 + 6) + 6) + 2 + 4 * 2 diff --git a/sample/day-19-input.txt b/sample/day-19-input.txt deleted file mode 100644 index 1500b6f..0000000 --- a/sample/day-19-input.txt +++ /dev/null @@ -1,12 +0,0 @@ -0: 4 1 5 -1: 2 3 | 3 2 -2: 4 4 | 5 5 -3: 4 5 | 5 4 -4: "a" -5: "b" - -ababbb -bababa -abbbab -aaabbb -aaaabbb diff --git a/sample/day-2-input.txt b/sample/day-2-input.txt deleted file mode 100644 index fe19c03..0000000 --- a/sample/day-2-input.txt +++ /dev/null @@ -1,3 +0,0 @@ -1-3 a: abcde -1-3 b: cdefg -2-9 c: ccccccccc diff --git a/sample/day-20-input.txt b/sample/day-20-input.txt deleted file mode 100644 index 546e71d..0000000 --- a/sample/day-20-input.txt +++ /dev/null @@ -1,108 +0,0 @@ -Tile 2311: -..##.#..#. -##..#..... -#...##..#. -####.#...# -##.##.###. -##...#.### -.#.#.#..## -..#....#.. -###...#.#. -..###..### - -Tile 1951: -#.##...##. -#.####...# -.....#..## -#...###### -.##.#....# -.###.##### -###.##.##. -.###....#. -..#.#..#.# -#...##.#.. - -Tile 1171: -####...##. -#..##.#..# -##.#..#.#. -.###.####. -..###.#### -.##....##. -.#...####. -#.##.####. -####..#... -.....##... - -Tile 1427: -###.##.#.. -.#..#.##.. -.#.##.#..# -#.#.#.##.# -....#...## -...##..##. -...#.##### -.#.####.#. -..#..###.# -..##.#..#. - -Tile 1489: -##.#.#.... -..##...#.. -.##..##... -..#...#... -#####...#. -#..#.#.#.# -...#.#.#.. -##.#...##. -..##.##.## -###.##.#.. - -Tile 2473: -#....####. -#..#.##... -#.##..#... -######.#.# -.#...#.#.# -.######### -.###.#..#. -########.# -##...##.#. -..###.#.#. - -Tile 2971: -..#.#....# -#...###... -#.#.###... -##.##..#.. -.#####..## -.#..####.# -#..#.#..#. -..####.### -..#.#.###. -...#.#.#.# - -Tile 2729: -...#.#.#.# -####.#.... -..#.#..... -....#..#.# -.##..##.#. -.#.####... -####.#.#.. -##.####... -##..#.##.. -#.##...##. - -Tile 3079: -#.#.#####. -.#..###### -..#....... -######.... -####.#..#. -.#...#.##. -#.#####.## -..#.###... -..#....... -..#.###... - diff --git a/sample/day-21-input.txt b/sample/day-21-input.txt deleted file mode 100644 index 1c0ea2f..0000000 --- a/sample/day-21-input.txt +++ /dev/null @@ -1,4 +0,0 @@ -mxmxvkd kfcds sqjhc nhms (contains dairy, fish) -trh fvjkl sbzzf mxmxvkd (contains dairy) -sqjhc fvjkl (contains soy) -sqjhc mxmxvkd sbzzf (contains fish) diff --git a/sample/day-22-input.txt b/sample/day-22-input.txt deleted file mode 100644 index 391cd24..0000000 --- a/sample/day-22-input.txt +++ /dev/null @@ -1,13 +0,0 @@ -Player 1: -9 -2 -6 -3 -1 - -Player 2: -5 -8 -4 -7 -10 diff --git a/sample/day-23-input.txt b/sample/day-23-input.txt deleted file mode 100644 index 17f006f..0000000 --- a/sample/day-23-input.txt +++ /dev/null @@ -1 +0,0 @@ -364289715 diff --git a/sample/day-24-input.txt b/sample/day-24-input.txt deleted file mode 100644 index 3dc2f67..0000000 --- a/sample/day-24-input.txt +++ /dev/null @@ -1,20 +0,0 @@ -sesenwnenenewseeswwswswwnenewsewsw -neeenesenwnwwswnenewnwwsewnenwseswesw -seswneswswsenwwnwse -nwnwneseeswswnenewneswwnewseswneseene -swweswneswnenwsewnwneneseenw -eesenwseswswnenwswnwnwsewwnwsene -sewnenenenesenwsewnenwwwse -wenwwweseeeweswwwnwwe -wsweesenenewnwwnwsenewsenwwsesesenwne -neeswseenwwswnwswswnw -nenwswwsewswnenenewsenwsenwnesesenew -enewnwewneswsewnwswenweswnenwsenwsw -sweneswneswneneenwnewenewwneswswnese -swwesenesewenwneswnwwneseswwne -enesenwswwswneneswsenwnewswseenwsese -wnwnesenesenenwwnenwsewesewsesesew -nenewswnwewswnenesenwnesewesw -eneswnwswnwsenenwnwnwwseeswneewsenese -neswnwewnwnwseenwseesewsenwsweewe -wseweeenwnesenwwwswnew diff --git a/sample/day-3-input.txt b/sample/day-3-input.txt deleted file mode 100644 index 7e88cdc..0000000 --- a/sample/day-3-input.txt +++ /dev/null @@ -1,11 +0,0 @@ -..##....... -#...#...#.. -.#....#..#. -..#.#...#.# -.#...##..#. -..#.##..... -.#.#.#....# -.#........# -#.##...#... -#...##....# -.#..#...#.# diff --git a/sample/day-4-input.txt b/sample/day-4-input.txt deleted file mode 100644 index 0ff208e..0000000 --- a/sample/day-4-input.txt +++ /dev/null @@ -1,13 +0,0 @@ -ecl:gry pid:860033327 eyr:2020 hcl:#fffffd -byr:1937 iyr:2017 cid:147 hgt:183cm - -iyr:2013 ecl:amb cid:350 eyr:2023 pid:028048884 -hcl:#cfa07d byr:1929 - -hcl:#ae17e1 iyr:2013 -eyr:2024 -ecl:brn pid:760753108 byr:1931 -hgt:179cm - -hcl:#cfa07d eyr:2025 pid:166559648 -iyr:2011 ecl:brn hgt:59in diff --git a/sample/day-5-input.txt b/sample/day-5-input.txt deleted file mode 100644 index 6b89eb8..0000000 --- a/sample/day-5-input.txt +++ /dev/null @@ -1,4 +0,0 @@ -FBFBBFFRLR -BFFFBBFRRR -FFFBBBFRRR -BBFFBBFRLL diff --git a/sample/day-6-input.txt b/sample/day-6-input.txt deleted file mode 100644 index 0f5b3bc..0000000 --- a/sample/day-6-input.txt +++ /dev/null @@ -1,15 +0,0 @@ -abc - -a -b -c - -ab -ac - -a -a -a -a - -b diff --git a/sample/day-7-input.txt b/sample/day-7-input.txt deleted file mode 100644 index 1cec74f..0000000 --- a/sample/day-7-input.txt +++ /dev/null @@ -1,9 +0,0 @@ -light red bags contain 1 bright white bag, 2 muted yellow bags. -dark orange bags contain 3 bright white bags, 4 muted yellow bags. -bright white bags contain 1 shiny gold bag. -muted yellow bags contain 2 shiny gold bags, 9 faded blue bags. -shiny gold bags contain 1 dark olive bag, 2 vibrant plum bags. -dark olive bags contain 3 faded blue bags, 4 dotted black bags. -vibrant plum bags contain 5 faded blue bags, 6 dotted black bags. -faded blue bags contain no other bags. -dotted black bags contain no other bags. diff --git a/sample/day-8-input.txt b/sample/day-8-input.txt deleted file mode 100644 index 178df53..0000000 --- a/sample/day-8-input.txt +++ /dev/null @@ -1,9 +0,0 @@ -nop +0 -acc +1 -jmp +4 -acc +3 -jmp -3 -acc -99 -acc +1 -jmp -4 -acc +6 diff --git a/sample/day-9-input.txt b/sample/day-9-input.txt deleted file mode 100644 index 05803e5..0000000 --- a/sample/day-9-input.txt +++ /dev/null @@ -1,40 +0,0 @@ -9223372036854775807 -9223372036854775807 -9223372036854775807 -9223372036854775807 -9223372036854775807 -9223372036854775807 -9223372036854775807 -9223372036854775807 -9223372036854775807 -9223372036854775807 -9223372036854775807 -9223372036854775807 -9223372036854775807 -9223372036854775807 -9223372036854775807 -9223372036854775807 -9223372036854775807 -9223372036854775807 -9223372036854775807 -9223372036854775807 -35 -20 -15 -25 -47 -40 -62 -55 -65 -95 -103 -117 -150 -182 -127 -219 -299 -277 -309 -576 \ No newline at end of file diff --git a/src/day01.rs b/src/day01.rs index b1e43b7..aa58887 100644 --- a/src/day01.rs +++ b/src/day01.rs @@ -1,66 +1,23 @@ use crate::get_lines; -pub fn get_input() -> Vec { - let mut items: Vec = get_lines("day-1-input.txt") - .map(|line| line.parse::().unwrap()) - .filter(|candidate| *candidate <= 2020u16) // filter out anything that is obviously too big - .collect(); - items.sort_unstable(); // sort to reduce the search space for the complement - items +pub fn get_input() -> Vec { + get_lines("day-1-input.txt").collect() } #[cfg(test)] mod tests { - use std::cmp::Ordering; - #[test] + // #[test] fn part1() { - let items = super::get_input(); + let _items = super::get_input(); - for i in 0..items.len() - 1 { - let x: u32 = items[i].into(); - for y in items.iter().skip(i + 1) { - let y = *y as u32; - let result = x + y; - match result.cmp(&2020) { - Ordering::Equal => { - println!("Part 1: {}", (x * y)); - return; - } - Ordering::Greater => { - break; - } - Ordering::Less => {} - } - } - } + todo!() } - #[test] + // #[test] fn part2() { - let items = super::get_input(); - for i in 0..items.len() - 2 { - let x: u32 = items[i].into(); - for j in i + 1..items.len() - 1 { - let y: u32 = items[j].into(); - if x + y > 2020 { - break; - } - for z in items.iter().skip(j + 1) { - let z = *z as u32; - let result = x + y + z; - match result.cmp(&2020u32) { - Ordering::Less => {} - Ordering::Equal => { - println!("Part 2: {}", (x * y * z)); - return; - } - Ordering::Greater => { - break; - } - } - } - } - } + let _items = super::get_input(); + + todo!() } } diff --git a/src/day02.rs b/src/day02.rs deleted file mode 100644 index 3ef99cc..0000000 --- a/src/day02.rs +++ /dev/null @@ -1,109 +0,0 @@ -use unicode_segmentation::UnicodeSegmentation; - -use crate::get_lines; - -pub fn get_input() -> impl Iterator { - get_lines("day-2-input.txt") -} - -trait Entry { - fn is_valid(&self) -> bool; - fn build(line: String) -> Self; // TODO impl FromStr -} - -pub struct SledEntry { - c: String, - password: String, - min_iterations: usize, - max_iterations: usize, -} - -impl Entry for SledEntry { - fn is_valid(&self) -> bool { - let count: usize = self - .password - .graphemes(true) - .filter(|grapheme| *grapheme == self.c) - .count() as usize; - count >= self.min_iterations && count <= self.max_iterations - } - - fn build(line: String) -> Self { - let mut components = line.split_whitespace(); - let range_string = components.next().unwrap(); - let c = components.next().unwrap().replace(':', ""); - let password = components.next().unwrap().to_owned(); - - let mut range_components = range_string - .split('-') - .map(|component| component.parse::()) - .map(Result::unwrap); - let min_iterations = range_components.next().unwrap(); - let max_iterations = range_components.next().unwrap(); - - SledEntry { - c, - password, - min_iterations, - max_iterations, - } - } -} - -pub struct TobogganEntry { - c: String, - password: String, - first_position: usize, - second_position: usize, -} - -impl Entry for TobogganEntry { - fn is_valid(&self) -> bool { - let password_chars = &self.password.graphemes(true).collect::>(); - let x = password_chars[&self.first_position - 1]; - let y = password_chars[&self.second_position - 1]; - (x == self.c) ^ (y == self.c) - } - - fn build(line: String) -> Self { - let mut components = line.split_whitespace(); - let position_str = components.next().unwrap(); - let c = components.next().unwrap().replace(':', ""); - let password = components.next().unwrap().to_owned(); - let mut position_components = position_str - .split('-') - .map(|component| component.parse::()) - .map(Result::unwrap); - let first_position: usize = position_components.next().unwrap(); - let second_position: usize = position_components.next().unwrap(); - TobogganEntry { - c, - password, - first_position, - second_position, - } - } -} - -#[cfg(test)] -mod tests { - use crate::day02::{get_input, Entry, SledEntry, TobogganEntry}; - - #[test] - fn part1() { - let count = get_input() - .map(SledEntry::build) - .filter(SledEntry::is_valid) - .count(); - println!("Part 1: {}", count); - } - - #[test] - fn part2() { - let count = get_input() - .map(TobogganEntry::build) - .filter(TobogganEntry::is_valid) - .count(); - println!("Part 2: {}", count); - } -} diff --git a/src/day03.rs b/src/day03.rs deleted file mode 100644 index cc2085f..0000000 --- a/src/day03.rs +++ /dev/null @@ -1,99 +0,0 @@ -use crate::get_lines; - -fn get_input() -> impl Iterator { - get_lines("day-3-input.txt") -} - -/// A map of the trees in the area -pub fn get_map() -> Vec> { - get_input() - .map(|line| { - line.chars() - .map(|square| square == '#') - .collect::>() - }) - .collect() -} - -/// Returns the number of trees a toboggan will encounter when traveling from the top-left of a map -/// to the bottom. -/// -/// Parameters -/// * `forest` - a map of the area with `true` squares denoting the presence of a tree -/// * `slope` - the angle at which the toboggan travels -pub fn count_trees(forest: &[Vec], slope: &Slope) -> u8 { - let mut num_trees: u8 = 0; - let mut row_index: usize = 0; - let mut column_index: usize = 0; - - loop { - let row = &forest[row_index]; - let cell = &row[column_index]; - if *cell { - num_trees += 1; - } - // waiting for destructuring assignment: https://github.com/rust-lang/rfcs/issues/372 - let (new_row, new_column) = slope.move_toboggan(row_index, column_index, row.len()); - row_index = new_row; - column_index = new_column; - - if row_index >= forest.len() { - break num_trees; - } - } -} - -pub struct Slope { - right: usize, - down: usize, -} - -impl Slope { - /// Returns the new coordinates of the toboggan on the map - pub fn move_toboggan( - &self, - current_row: usize, - current_column: usize, - num_columns: usize, - ) -> (usize, usize) { - let row = current_row + self.down; - let column = current_column + self.right; - // These aren't the only trees, though; due to something you read about once involving - // arboreal genetics and biome stability, the same pattern repeats to the right many times - let column = column % num_columns; - (row, column) - } -} - -#[cfg(test)] -mod tests { - use crate::day03::{count_trees, get_map, Slope}; - - #[test] - fn part1() { - let slope = Slope { right: 3, down: 1 }; - - let num_trees = count_trees(&get_map(), &slope); - - println!("Part 1: {}", num_trees); - } - - #[test] - fn part2() { - let slopes = vec![ - Slope { right: 1, down: 1 }, - Slope { right: 3, down: 1 }, - Slope { right: 5, down: 1 }, - Slope { right: 7, down: 1 }, - Slope { right: 1, down: 2 }, - ]; - let forest = get_map(); - - let num_trees = slopes - .iter() - .map(|slope| count_trees(&forest, slope)) - .fold(1u64, |accumulator, count| accumulator * (count as u64)); - - println!("Part 2: {}", num_trees); - } -} diff --git a/src/day04.rs b/src/day04.rs deleted file mode 100644 index 1dae851..0000000 --- a/src/day04.rs +++ /dev/null @@ -1,118 +0,0 @@ -use std::collections::HashMap; - -use crate::get_block_strings; - -fn get_input() -> impl Iterator { - get_block_strings("day-4-input.txt") -} - -pub fn get_blocks() -> impl Iterator> { - get_input().map(|block| -> HashMap { - block - .split_whitespace() - .map(|string| string.trim()) - .filter(|block_entry| !block_entry.is_empty()) - .map(|block_entry| -> (String, String) { - let (key, value) = block_entry.split_once(':').unwrap(); - (key.trim().to_owned(), value.trim().to_owned()) - }) - .collect() - }) -} - -#[cfg(test)] -mod tests { - use std::collections::HashSet; - - use regex::Regex; - - use crate::day04::get_blocks; - - #[test] - fn part1() { - let count_valid = get_blocks() - .filter(|block| block.contains_key("byr")) - .filter(|block| block.contains_key("iyr")) - .filter(|block| block.contains_key("eyr")) - .filter(|block| block.contains_key("hgt")) - .filter(|block| block.contains_key("hcl")) - .filter(|block| block.contains_key("ecl")) - .filter(|block| block.contains_key("pid")) - .count(); - println!("Part 1: {}", count_valid); - } - - #[test] - fn part2() { - let valid_hair_colour = Regex::new(r"^#[0-9a-f]{6}$").unwrap(); - let valid_eye_colours: HashSet<&'static str> = - ["amb", "blu", "brn", "gry", "grn", "hzl", "oth"] - .iter() - .cloned() - .collect(); - let valid_passport_id = Regex::new(r"^[0-9]{9}$").unwrap(); - - let count_valid = get_blocks() - .filter(|block| -> bool { - let birth_year: Option = block - .get("byr") - .and_then(|string| string.parse::().ok()) - .filter(|year| *year >= 1920 && *year <= 2002); - birth_year.is_some() - }) - .filter(|block| -> bool { - let issue_year: Option = block - .get("iyr") - .and_then(|year| year.parse::().ok()) - .filter(|year| *year >= 2010 && *year <= 2020); - issue_year.is_some() - }) - .filter(|block| -> bool { - let expiration_year: Option = block - .get("eyr") - .map(|year| year.parse::().unwrap()) - .filter(|year| *year >= 2020 && *year <= 2030); - expiration_year.is_some() - }) - .filter(|block| -> bool { - let height = block.get("hgt").filter(|string| -> bool { - if string.ends_with("cm") { - let cm = string.replace("cm", "").parse::(); - if cm.is_err() { - return false; - } - let cm = cm.unwrap(); - (150..=193).contains(&cm) - } else if string.ends_with("in") { - let inches = string.replace("in", "").parse::(); - if inches.is_err() { - return false; - } - let inches = inches.unwrap(); - (59..=76).contains(&inches) - } else { - false - } - }); - height.is_some() - }) - .filter(|block| -> bool { - let hair_colour = block - .get("hcl") - .filter(|colour| valid_hair_colour.is_match(colour)); - hair_colour.is_some() - }) - .filter(|block| -> bool { - let eye_colour = block - .get("ecl") - .filter(|colour| valid_eye_colours.contains(colour as &str)); - eye_colour.is_some() - }) - .filter(|block| -> bool { - let passport_id = block.get("pid").filter(|id| valid_passport_id.is_match(id)); - passport_id.is_some() - }) - .count(); - println!("Part 2: {}", count_valid); - } -} diff --git a/src/day05.rs b/src/day05.rs deleted file mode 100644 index 0c9469d..0000000 --- a/src/day05.rs +++ /dev/null @@ -1,79 +0,0 @@ -use crate::get_lines; - -fn get_input() -> impl Iterator { - get_lines("day-5-input.txt") -} - -pub fn get_sorted_seat_ids() -> Vec { - let mut result = get_input() - .map(|id| -> u16 { - let mut chars = id.chars(); - - let mut max_row_exclusive = 128u8; - let mut row = 0; - for i in 0..7_usize { - let partition = chars - .next() - .expect(&("Invalid id: ".to_owned() + &*id + " at index " + &i.to_string())); - if partition == 'B' { - row = ((max_row_exclusive - row) / 2u8) + row; - } else if partition == 'F' { - max_row_exclusive = max_row_exclusive - ((max_row_exclusive - row) / 2); - } else { - panic!( - "Invalid character '{}' at index {} for id {}.", - partition, i, id - ); - } - } - - let mut column = 0u8; - let mut max_column_exclusive = 8u8; - for i in 7..10_usize { - let partition = chars - .next() - .expect(&("Invalid id: ".to_owned() + &*id + " at index " + &i.to_string())); - if partition == 'R' { - column = ((max_column_exclusive - column) / 2u8) + column; - } else if partition == 'L' { - max_column_exclusive = - max_column_exclusive - ((max_column_exclusive - column) / 2); - } else { - panic!( - "Invalid character '{}' at index {} for id {}.", - partition, i, id - ); - } - } - - row as u16 * 8u16 + column as u16 - }) - .collect::>(); - result.sort_unstable(); - result -} - -#[cfg(test)] -mod tests { - use crate::day05::get_sorted_seat_ids; - - #[test] - fn part1() { - let seat_ids = get_sorted_seat_ids(); - let last_seat_id = seat_ids.last().expect("No seats found"); - println!("Part 1: {}", last_seat_id); - } - - #[test] - fn part2() { - let seat_ids = get_sorted_seat_ids(); - for i in 1..seat_ids.len() { - let x = seat_ids.get(i - 1).unwrap(); - let y = seat_ids.get(i).unwrap(); - if y - x > 1 { - println!("Part 2: {}", (x + 1)); - return; - } - } - } -} diff --git a/src/day06.rs b/src/day06.rs deleted file mode 100644 index 1b1ac9a..0000000 --- a/src/day06.rs +++ /dev/null @@ -1,58 +0,0 @@ -use crate::get_block_strings; - -pub fn get_input() -> impl Iterator> { - get_block_strings("day-6-input.txt").map(|string| { - string - .split_whitespace() - .map(|str| str.trim().to_owned()) - .collect() - }) -} - -#[cfg(test)] -mod tests { - use std::collections::HashSet; - - use crate::day06::get_input; - - #[test] - fn part1() { - let sum: u16 = get_input() - .map(|group| -> u16 { - // number of questions to which group answered yes - group - .iter() - .flat_map(|string| string.chars()) - .collect::>() - .len() as u16 - }) - .sum(); - println!("Part 1: {}", sum); - } - - #[test] - fn part2() { - let sum: u16 = get_input() - .map(|group| -> u16 { - // TODO support all UTF-8 code points - let unique_characters = group - .iter() - .flat_map(|string| string.chars()) - .collect::>(); - unique_characters - .iter() - .filter(|c| -> bool { - // whether or not c was answered by all in group - group - .iter() - .map(|string| string.chars().collect::>()) - .filter(|chars| chars.contains(c)) - .count() - == group.len() - }) - .count() as u16 - }) - .sum(); - println!("Part 2: {}", sum); - } -} diff --git a/src/day07.rs b/src/day07.rs deleted file mode 100644 index aac276a..0000000 --- a/src/day07.rs +++ /dev/null @@ -1,134 +0,0 @@ -use std::collections::HashMap; -use std::str::FromStr; - -use regex::Regex; - -use crate::day07::ParseError::{ - BagColourMissing, BagCountMissing, ContainerColourMissing, NothingContained, -}; -use crate::get_lines; - -pub fn get_input() -> HashMap { - get_lines("day-7-input.txt") - .flat_map(|sentence| sentence.parse::()) - .map(|rule| (rule.container_colour.to_owned(), rule)) - .collect() -} - -pub struct Rule { - container_colour: String, - contained_counts: HashMap, -} - -pub enum ParseError { - ContainerColourMissing, - NothingContained, - BagCountMissing, - BagColourMissing, -} - -impl FromStr for Rule { - type Err = ParseError; - - fn from_str(sentence: &str) -> Result { - lazy_static! { - static ref BAG_SUFFIX: Regex = Regex::new(" bag.*$").unwrap(); - } - let mut components = sentence.splitn(2, " bags contain "); - let container_colour = components.next(); - if container_colour.is_none() { - return Err(ContainerColourMissing); - } - let container_colour = container_colour.unwrap().trim().to_owned(); - let contained = components.next(); - if contained.is_none() { - return Err(NothingContained); - } - let contained = contained.unwrap().trim(); - if contained.eq("no other bags.") { - return Ok(Rule { - container_colour, - contained_counts: HashMap::new(), - }); - } - let contained_counts = contained - .split(", ") - .flat_map(|phrase| -> Result<(String, u32), Self::Err> { - let phrase = BAG_SUFFIX.replace(phrase, ""); - let mut phrase_components = phrase.splitn(2, ' '); - - let count = phrase_components - .next() - .and_then(|string| string.parse::().ok()); - if count.is_none() { - return Err(BagCountMissing); - } - - let colour = phrase_components.next(); - if colour.is_none() { - return Err(BagColourMissing); - } - - Ok((colour.unwrap().trim().to_owned(), count.unwrap())) - }) - .collect::>(); - Ok(Rule { - container_colour, - contained_counts, - }) - } -} - -impl Rule { - pub fn can_contain(&self, colour: &str, rule_map: &HashMap) -> bool { - if self.contained_counts.contains_key(colour) { - return true; - } - self.contained_counts - .keys() - .map(|key| rule_map.get(key)) - .any(|rule| -> bool { - match rule { - None => false, - Some(rule) => rule.can_contain(colour, rule_map), - } - }) - } - - pub fn count_contained(&self, rule_map: &HashMap) -> u32 { - let sum = &self - .contained_counts - .iter() - .flat_map(|(colour, multiplier)| -> Option { - rule_map.get(colour).map(|sub_rule| -> u32 { - let base = sub_rule.count_contained(rule_map); - base * multiplier - }) - }) - .sum(); - sum + 1u32 - } -} - -#[cfg(test)] -mod tests { - use crate::day07::get_input; - - #[test] - fn part1() { - let map = get_input(); - let count = map - .values() - .filter(|rule| rule.can_contain("shiny gold", &map)) - .count(); - println!("Part 1: {}", count); - } - - #[test] - fn part2() { - let map = get_input(); - let bag = map.get("shiny gold").unwrap(); - let result = bag.count_contained(&map) - 1; - println!("Part 2: {}", result); - } -} diff --git a/src/day08.rs b/src/day08.rs deleted file mode 100644 index 4e8d69d..0000000 --- a/src/day08.rs +++ /dev/null @@ -1,192 +0,0 @@ -use std::str::FromStr; - -use crate::get_lines; - -use crate::day08::Operation::{Accumulate, Jump, NoOp}; -use crate::day08::ParseError::{ - InvalidArgument, InvalidOperation, MissingArgument, MissingOperation, -}; -use std::num::ParseIntError; - -#[derive(Eq, PartialEq)] -pub enum Operation { - /// Increase or decrease the accumulator by the value in the argument. - /// Move to the instruction directly below. - Accumulate, - /// Do nothing then move to the instruction directly below. - NoOp, - /// Jump to a new instruction relative to the current one offset by the argument. - Jump, -} - -impl Operation { - pub fn update_total(&self, previous_total: i32, argument: i32) -> i32 { - match &self { - Accumulate => previous_total + argument, - NoOp => previous_total, - Jump => previous_total, - } - } - - pub fn update_index(&self, previous_index: usize, argument: i32) -> usize { - match &self { - Accumulate => previous_index + 1, - NoOp => previous_index + 1, - Jump => (previous_index as i32 + argument) as usize, - } - } -} - -pub enum ParseError { - InvalidOperation(String), - MissingOperation(String), - MissingArgument(String), - InvalidArgument(ParseIntError), -} - -impl FromStr for Operation { - type Err = ParseError; - - fn from_str(s: &str) -> Result { - match s { - "acc" => Ok(Accumulate), - "nop" => Ok(NoOp), - "jmp" => Ok(Jump), - _ => Err(InvalidOperation(String::from(s))), - } - } -} - -/// A boot code instruction -pub struct Instruction { - operation: Operation, - argument: i32, -} - -impl Instruction { - /// Compute the new value of the accumulator - /// - /// Parameters: - /// - `previous_total` - the current accumulator value - /// - /// Returns: the new accumulator value - pub fn update_total(&self, previous_total: i32) -> i32 { - self.operation.update_total(previous_total, self.argument) - } - - /// Identify the index of the next instruction to execute - /// - /// Parameters: - /// - `previous_index` - the current instruction index - /// - /// Returns: the index of the next instruction to execute - pub fn update_index(&self, previous_index: usize) -> usize { - self.operation.update_index(previous_index, self.argument) - } -} - -impl FromStr for Instruction { - type Err = ParseError; - - fn from_str(s: &str) -> Result { - let mut components = s.splitn(2, ' '); - let operation = match components.next() { - None => return Err(MissingOperation(String::from(s))), - Some(operation) => match operation.parse::() { - Ok(operation) => operation, - Err(e) => return Err(e), - }, - }; - - let argument = match components.next() { - None => return Err(MissingArgument(String::from(s))), - Some(argument) => match argument.parse::() { - Ok(argument) => argument, - Err(parse_int_error) => return Err(InvalidArgument(parse_int_error)), - }, - }; - - Ok(Instruction { - operation, - argument, - }) - } -} - -pub fn get_instructions() -> Vec { - get_lines("day-8-input.txt") - .flat_map(|line| line.parse()) - .collect() -} - -#[cfg(test)] -mod tests { - use crate::day08::Operation::{Accumulate, Jump, NoOp}; - use crate::day08::{get_instructions, Instruction}; - - #[test] - fn part1() { - let instructions = get_instructions(); - let mut visited = vec![false; instructions.len()]; - let mut index = 0_usize; - let mut accumulator = 0_i32; - - while !visited[index] { - visited[index] |= true; - let instruction = &instructions[index]; - accumulator = instruction.update_total(accumulator); - index = instruction.update_index(index); - } - println!("Part 1: {}", accumulator); - } - - #[test] - fn part2() { - let instructions = get_instructions(); - // "After some careful analysis, you believe that exactly one instruction is corrupted." - 'instructions: for i in 0..instructions.len() { - let to_replace = &instructions[i]; - if to_replace.operation == Accumulate { - // "No acc instructions were harmed in the corruption of this boot code." - continue; - } - let operation = if to_replace.operation == NoOp { - Jump - } else { - NoOp - }; - let replacement = Instruction { - operation, - argument: to_replace.argument, - }; - - let mut index = 0_usize; - let mut accumulator = 0_i32; - let mut visited = vec![false; instructions.len()]; - - // "The program is supposed to terminate by attempting to execute an instruction - // immediately after the last instruction in the file." - while index < instructions.len() { - let instruction = if index == i { - &replacement - } else { - &instructions[index] - }; - if visited[index] { - // replacing the instruction causes an infinite loop - // try replacing a different one - - // NB: Simply re-visiting this instruction is an infinite loop because the - // argument to each instruction is constant and never dependent on the value of - // "accumulator" - continue 'instructions; - } - visited[index] |= true; - accumulator = instruction.update_total(accumulator); - index = instruction.update_index(index); - } - println!("Part 2: {}", accumulator); - break; - } - } -} diff --git a/src/day09.rs b/src/day09.rs deleted file mode 100644 index 5b893b6..0000000 --- a/src/day09.rs +++ /dev/null @@ -1,97 +0,0 @@ -use crate::get_lines; - -// https://adventofcode.com/2020/day/9 - -/// "Though the port is non-standard, you manage to connect it to your computer through the clever -/// use of several paperclips. Upon connection, the port outputs a series of numbers (your puzzle -/// input). -/// -/// The data appears to be encrypted with the eXchange-Masking Addition System (XMAS) which, -/// conveniently for you, is an old cypher with an important weakness." -pub fn get_data() -> impl Iterator { - get_lines("day-9-input.txt") - .map(|line| line.parse()) - .map(|result| result.unwrap()) // panic on invalid XMAS code -} - -#[cfg(test)] -mod tests { - use std::collections::LinkedList; - - use crate::day09::get_data; - use std::cmp::Ordering; - - #[test] - fn test() { - let preamble_size = 25_usize; - let mut buffer: LinkedList = LinkedList::new(); - let mut data = get_data(); - // "XMAS starts by transmitting a preamble of 25 numbers." - for _ in 0..preamble_size { - buffer.push_back(data.next().unwrap()); - } - let invalid = 'candidates: loop { - match data.next() { - None => break None, - Some(number) => { - // "each number you receive should be the sum of any two of the 25 immediately - // previous numbers" - let mut addends = buffer - .iter() - // no negative numbers in the input, so filter out anything larger than our - // target - .filter(|previous| **previous <= number) - .collect::>(); - addends.sort(); // sort so we can quit search early - for i in 0..addends.len() - 1 { - let x = addends[i]; - for y in addends.iter().skip(i + 1) { - let sum = x + *y; - if sum == number { - buffer.push_back(number); - buffer.pop_front(); - continue 'candidates; - } - } - } - break Some(number); - } - } - }; - let invalid = invalid.unwrap(); - println!("Part 1: {}", invalid); - - // I avoided putting all the input into memory until this point, but for the next part, it - // seems to be the most elegant approach. Alternatively, I could use two iterators over the - // input file, one to iterate through the potential left bounds and one to find the right - // bound for each potential left bound. - let data = get_data().collect::>(); - 'left_bounds: for i in 0..data.len() - 1 { - let mut total = data[i]; - let mut min = total; - let mut max = total; - for current in data.iter().skip(i + 1) { - if current < &min { - min = *current; - } - if current > &max { - max = *current; - } - total += current; - match total.cmp(&invalid) { - Ordering::Equal => { - let result = min + max; - println!("Part 2: {}", result); - return; - } - Ordering::Less => {} - Ordering::Greater => { - // Since there are no negative numbers, stop the search when the numbers become - // too big. - continue 'left_bounds; - } - } - } - } - } -} diff --git a/src/day10.rs b/src/day10.rs deleted file mode 100644 index a4db039..0000000 --- a/src/day10.rs +++ /dev/null @@ -1,123 +0,0 @@ -use std::collections::hash_map::DefaultHasher; -use std::collections::HashMap; -use std::hash::{Hash, Hasher}; - -use crate::get_lines; - -// https://adventofcode.com/2020/day/10 - -/// Get a sorted, unique list of the joltages of all the available adapters. -/// -/// *Panics* if any line in the input contains a malformed joltage -/// -/// "Always prepared, you make a list of all of the joltage adapters in your bag." -pub fn get_joltage_adapters() -> Vec { - let mut adapters = get_lines("day-10-input.txt") - .map(|line| line.parse()) - .map(|result| result.unwrap()) // panic on invalid joltage - .collect::>(); - adapters.sort_unstable(); - adapters -} - -/// Count the number of ways _adapters_ can be arranged to connect a charging outlet to a device. -/// -/// Parameters: -/// * `adapters` - a unique and sorted list of the joltages of the available adapters. This method -/// will not return a correct value if the vector is not unique and sorted. -/// * `from` - the joltage of the charging outlet -/// * `to` - the joltage of the device that needs to be charged -/// * `cache` - a history of precomputed arrangement counts. This will be updated prior to the -/// method returning. -pub fn count_adapter_arrangements( - adapters: &[u8], - from: u8, - to: u8, - cache: &mut HashMap, -) -> u64 { - let hash = || { - let mut hasher = DefaultHasher::new(); - hasher.write_u8(from); - hasher.write_u8(to); - adapters.hash(&mut hasher); - hasher.finish() - }; - - let hash = hash(); - if cache.contains_key(&hash) { - return cache[&hash]; - } - - if adapters.is_empty() { - return u64::from(from + 3 == to); - } else if adapters.len() == 1 { - let last = adapters[0]; - return u64::from(last == to - 3); - } - - let mut retval = 0u64; - for i in 0..3usize { - if i >= adapters.len() { - break; - } - let first = adapters[i]; - let difference = first - from; - if (1..=3).contains(&difference) { - let remaining = if i < adapters.len() { - adapters.split_at(i + 1).1 - } else { - &[0u8] - }; - retval += count_adapter_arrangements(remaining, first, to, cache); - } - } - cache.insert(hash, retval); - retval -} - -#[cfg(test)] -mod tests { - use std::collections::HashMap; - - use crate::day10::{count_adapter_arrangements, get_joltage_adapters}; - - #[test] - fn test() { - let joltages = get_joltage_adapters(); - let target_joltage = joltages - .last() - .expect("At least one joltage adapter is required.") - + 3u8; - - // "If you use every adapter in your bag at once, what is the distribution of joltage - // differences between the charging outlet, the adapters, and your device?" - // "In addition, your device has a built-in joltage adapter rated for 3 jolts higher than - // the highest-rated adapter in your bag." - let mut difference_distribution = [0u8, 0u8, 1u8]; - - // "Treat the charging outlet near your seat as having an effective joltage rating of 0." - let mut current_joltage = 0u8; - - while current_joltage < target_joltage - 3 { - let next = joltages - .iter() - .find(|candidate| { - **candidate > current_joltage - && **candidate - current_joltage >= 1 - && **candidate - current_joltage <= 3 - }) - .expect("Required joltage adapter not available."); - let difference = *next as usize - current_joltage as usize; - difference_distribution[difference - 1] += 1; - current_joltage = *next; - } - println!( - "Part 1: {}", - difference_distribution[0] as u16 * difference_distribution[2] as u16 - ); - println!( - "Part 2: {}", - count_adapter_arrangements(&joltages, 0, target_joltage, &mut HashMap::new()) - ); - } -} diff --git a/src/day11.rs b/src/day11.rs deleted file mode 100644 index 5286490..0000000 --- a/src/day11.rs +++ /dev/null @@ -1,384 +0,0 @@ -// https://adventofcode.com/2020/day/11 - -use std::iter::repeat; -use std::str::FromStr; - -use unicode_segmentation::UnicodeSegmentation; - -use crate::get_lines; - -use crate::day11::Direction::{ - East, North, NorthEast, NorthWest, South, SouthEast, SouthWest, West, -}; -use crate::day11::Position::{EmptySeat, Floor, OccupiedSeat}; - -/// A position in the seating layout -#[derive(Clone, Copy, Eq, PartialEq)] -pub enum Position { - Floor, - EmptySeat, - OccupiedSeat, -} - -impl FromStr for Position { - type Err = (); - - fn from_str(s: &str) -> Result { - match s { - "." => Ok(Floor), - "L" => Ok(EmptySeat), - "#" => Ok(OccupiedSeat), - _ => Err(()), - } - } -} - -/// "The seat layout fits neatly on a grid." -pub fn read_seat_layout() -> Vec> { - get_lines("day-11-input.txt") - .map(|line| -> Vec { - line.graphemes(true).flat_map(Position::from_str).collect() - }) - .collect() -} - -/// "Now, you just need to model the people who will be arriving shortly. Fortunately, people are -/// entirely predictable and always follow a simple set of rules. All decisions are based on the -/// number of occupied seats adjacent to a given seat (one of the eight positions immediately up, -/// down, left, right, or diagonal from the seat)." -pub fn update_seat_based_on_neighbours( - row_index: usize, - column_index: usize, - source: &[Vec], -) -> Position { - let row = &source[row_index]; - let has_preceding_row = row_index > 0; - let has_subsequent_row = row_index < source.len() - 1; - let has_preceding_column = column_index > 0; - let has_subsequent_column = column_index < row.len() - 1; - match source[row_index][column_index] { - Floor => Floor, // "Floor (.) never changes; seats don't move, and nobody sits on the floor" - EmptySeat => { - // "If a seat is empty and there are no occupied seats adjacent to it, the seat becomes - // occupied." - let mut has_occupied_neighbour = false; - - // check current row - if has_preceding_column { - has_occupied_neighbour |= row[column_index - 1] == OccupiedSeat; - } - if has_subsequent_column { - has_occupied_neighbour |= row[column_index + 1] == OccupiedSeat; - } - if has_preceding_row && !has_occupied_neighbour { - // check preceding row - let preceding_row = &source[row_index - 1]; - has_occupied_neighbour |= preceding_row[column_index] == OccupiedSeat; - if has_preceding_column { - has_occupied_neighbour |= preceding_row[column_index - 1] == OccupiedSeat; - } - if has_subsequent_column { - has_occupied_neighbour |= preceding_row[column_index + 1] == OccupiedSeat; - } - } - if has_subsequent_row && !has_occupied_neighbour { - // check subsequent row - let subsequent_row = &source[row_index + 1]; - has_occupied_neighbour |= subsequent_row[column_index] == OccupiedSeat; - if has_preceding_column { - has_occupied_neighbour |= subsequent_row[column_index - 1] == OccupiedSeat; - } - if has_subsequent_column { - has_occupied_neighbour |= subsequent_row[column_index + 1] == OccupiedSeat; - } - } - - if has_occupied_neighbour { - EmptySeat - } else { - OccupiedSeat - } - } - OccupiedSeat => { - // "If a seat is occupied (#) and four or more seats adjacent to it are also occupied, - // the seat becomes empty." - - let mut occupied_neighbours = 0u8; - - // check current row - if has_preceding_column && row[column_index - 1] == OccupiedSeat { - occupied_neighbours += 1; - } - if has_subsequent_column && row[column_index + 1] == OccupiedSeat { - occupied_neighbours += 1; - } - if has_preceding_row { - // check preceding row - let preceding_row = &source[row_index - 1]; - - if preceding_row[column_index] == OccupiedSeat { - occupied_neighbours += 1; - } - if has_preceding_column && preceding_row[column_index - 1] == OccupiedSeat { - occupied_neighbours += 1; - } - if has_subsequent_column && preceding_row[column_index + 1] == OccupiedSeat { - occupied_neighbours += 1; - } - } - if has_subsequent_row { - // check subsequent row - let subsequent_row = &source[row_index + 1]; - - if subsequent_row[column_index] == OccupiedSeat { - occupied_neighbours += 1; - } - if has_preceding_column && subsequent_row[column_index - 1] == OccupiedSeat { - occupied_neighbours += 1; - } - if has_subsequent_column && subsequent_row[column_index + 1] == OccupiedSeat { - occupied_neighbours += 1; - } - } - if occupied_neighbours >= 4 { - EmptySeat - } else { - OccupiedSeat - } - } - } -} - -/// Update each seat based on its adjacent seats. Perform all updates simultaneously. -pub fn update_seats_based_on_neighbours(seat_layout: &[Vec]) -> Vec> { - let mut new_layout = seat_layout.to_owned(); - for i in 0..seat_layout.len() { - let row = &seat_layout[i]; - for j in 0..row.len() { - new_layout[i][j] = update_seat_based_on_neighbours(i, j, seat_layout); - } - } - new_layout -} - -/// Count the number of occupied seats in the given layout. -pub fn count_occupied(seat_layout: &[Vec]) -> u16 { - let mut count = 0u16; - for row in seat_layout { - for cell in row { - count += match cell { - OccupiedSeat => 1, - _ => 0, - } - } - } - count -} - -pub enum Direction { - North, - NorthWest, - West, - SouthWest, - South, - SouthEast, - East, - NorthEast, -} - -impl Direction { - fn has_occupied_seat_in_sight( - &self, - vantage_row: usize, - vantage_column: usize, - source: &[Vec], - max_columns: usize, - ) -> bool { - for (i, j) in - self.get_visible_seat_indices(vantage_row, vantage_column, source.len(), max_columns) - { - match source[i][j] { - EmptySeat => return false, - OccupiedSeat => return true, - _ => continue, - } - } - false - } - fn get_visible_seat_indices( - &self, - vantage_row: usize, - vantage_column: usize, - max_rows: usize, - max_columns: usize, - ) -> Box> { - match self { - Direction::North => { - let row_indices = (0..vantage_row).rev(); - let col_indices = repeat(vantage_column); - Box::new(row_indices.zip(col_indices)) - } - Direction::NorthWest => { - let row_indices = (0..vantage_row).rev(); - let col_indices = (0..vantage_column).rev(); - Box::new(row_indices.zip(col_indices)) - } - Direction::West => { - let row_indices = repeat(vantage_row); - let col_indices = (0..vantage_column).rev(); - Box::new(row_indices.zip(col_indices)) - } - Direction::SouthWest => { - let row_indices = vantage_row + 1..max_rows; - let col_indices = (0..vantage_column).rev(); - Box::new(row_indices.zip(col_indices)) - } - Direction::South => { - let row_indices = vantage_row + 1..max_rows; - let col_indices = repeat(vantage_column); - Box::new(row_indices.zip(col_indices)) - } - Direction::SouthEast => { - let row_indices = vantage_row + 1..max_rows; - let col_indices = vantage_column + 1..max_columns; - Box::new(row_indices.zip(col_indices)) - } - Direction::East => { - let row_indices = repeat(vantage_row); - let col_indices = vantage_column + 1..max_columns; - Box::new(row_indices.zip(col_indices)) - } - Direction::NorthEast => { - let row_indices = (0..vantage_row).rev(); - let col_indices = vantage_column + 1..max_columns; - Box::new(row_indices.zip(col_indices)) - } - } - } -} - -/// Update a seat based on what is visible from that seat's vantage point. -/// -/// "People don't just care about adjacent seats - they care about the first seat they can see in -/// each of those eight directions! -/// -/// Now, instead of considering just the eight immediately adjacent seats, consider the first seat -/// in each of those eight directions." -/// -/// Parameters: -/// * `row_index` - the row of the seat to update -/// * `column_index` - the column of the seat to update -/// * `source` - the full seating layout -/// -/// Returns: the new seating status -pub fn update_seat_based_on_visibility( - row_index: usize, - column_index: usize, - source: &[Vec], -) -> Position { - match source[row_index][column_index] { - Floor => Floor, - EmptySeat => { - // "empty seats that see no occupied seats become occupied" - let row = &source[row_index]; - let mut has_occupied_seat_in_sight = false; - for direction in [ - North, NorthWest, West, SouthWest, South, SouthEast, East, NorthEast, - ] - .iter() - { - has_occupied_seat_in_sight |= direction.has_occupied_seat_in_sight( - row_index, - column_index, - source, - row.len(), - ); - if has_occupied_seat_in_sight { - break; - } - } - if has_occupied_seat_in_sight { - EmptySeat - } else { - OccupiedSeat - } - } - OccupiedSeat => { - // "it now takes five or more visible occupied seats for an occupied seat to become - // empty" - let row = &source[row_index]; - let mut visible_occupied_seats = 0u8; - for direction in [ - North, NorthWest, West, SouthWest, South, SouthEast, East, NorthEast, - ] - .iter() - { - let has_occupied_seat_in_sight = direction.has_occupied_seat_in_sight( - row_index, - column_index, - source, - row.len(), - ); - if has_occupied_seat_in_sight { - visible_occupied_seats += 1; - } - if visible_occupied_seats >= 5 { - break; - } - } - if visible_occupied_seats >= 5 { - EmptySeat - } else { - OccupiedSeat - } - } - } -} - -/// Update all of the seats simultaneously based on what is visible from each individual seat. -pub fn update_seats_based_on_visibility(seat_layout: &[Vec]) -> Vec> { - let mut new_layout = seat_layout.to_owned(); - for i in 0..seat_layout.len() { - let row = &seat_layout[i]; - for j in 0..row.len() { - new_layout[i][j] = update_seat_based_on_visibility(i, j, seat_layout); - } - } - new_layout -} - -#[cfg(test)] -mod tests { - use crate::day11::{ - count_occupied, read_seat_layout, update_seats_based_on_neighbours, - update_seats_based_on_visibility, - }; - - #[test] - fn part1() { - let mut layout = read_seat_layout(); - // "Simulate your seating area by applying the seating rules repeatedly until no seats - // change state." - loop { - let new_layout = update_seats_based_on_neighbours(&layout); - if new_layout == layout { - break; - } - layout = new_layout; - } - println!("Part 1: {}", count_occupied(&layout)); - } - - #[test] - fn part2() { - let mut layout = read_seat_layout(); - loop { - let new_layout = update_seats_based_on_visibility(&layout); - if new_layout == layout { - break; - } - layout = new_layout; - } - println!("Part 2: {}", count_occupied(&layout)); - } -} diff --git a/src/day12.rs b/src/day12.rs deleted file mode 100644 index 9ad6937..0000000 --- a/src/day12.rs +++ /dev/null @@ -1,360 +0,0 @@ -// https://adventofcode.com/2020/day/12 - -use core::fmt; -use std::fmt::{Display, Formatter}; -use std::num::ParseIntError; -use std::str::FromStr; - -use crate::day12::Action::{East, Forward, Left, North, Right, South, West}; -use crate::day12::ParseError::{ - InstructionTooShort, InvalidAction, InvalidValue, ValueInappropriateForAction, -}; -use crate::get_lines; - -#[derive(Debug)] -pub enum ParseError { - InvalidAction(String), - InstructionTooShort(String), - InvalidValue(ParseIntError), - ValueInappropriateForAction(Action, i16), -} - -impl Display for ParseError { - fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - match self { - ParseError::InvalidAction(action) => write!(f, "Invalid action: {}", action), - ParseError::InstructionTooShort(instruction) => { - write!(f, "Instruction too short: {}", instruction) - } - ParseError::InvalidValue(error) => write!(f, "Could not parse value: {}", error), - ParseError::ValueInappropriateForAction(action, value) => { - write!( - f, - "Value {} is not appropriate for action {:?}", - value, action - ) - } - } - } -} - -/// An action that the ferry's navigation computer can produce. -#[derive(Debug)] -pub enum Action { - North, - South, - East, - West, - Left, - Right, - Forward, -} - -impl FromStr for Action { - type Err = ParseError; - - fn from_str(code: &str) -> Result { - match code { - "N" => Ok(North), - "S" => Ok(South), - "E" => Ok(East), - "W" => Ok(West), - "L" => Ok(Left), - "R" => Ok(Right), - "F" => Ok(Forward), - _ => Err(InvalidAction(code.to_owned())), - } - } -} - -/// An instruction produced by the ferry's navigation computer. A series of NavigationInstructions -/// will allow the ferry/ship to evade the storm and make it to the island. -/// -/// Each instruction consists of an Action and an integer value indicating the magnitude of that -/// action. -pub struct NavigationInstruction { - action: Action, - value: i16, -} - -impl FromStr for NavigationInstruction { - type Err = ParseError; - - fn from_str(s: &str) -> Result { - if s.len() < 2 { - return Err(InstructionTooShort(s.to_owned())); - } - let (action, value) = s.split_at(1); - action - .parse::() - .and_then(|action| -> Result { - value.parse::().map_err(InvalidValue).and_then( - |value| -> Result { - match action { - Left | Right => { - if value % 90 != 0 { - return Err(ValueInappropriateForAction(action, value)); - } - } - _ => {} - } - Ok(NavigationInstruction { action, value }) - }, - ) - }) - } -} - -pub struct Point { - /// longitudinal position, - /// positive numbers are to the East and negative numbers are to the West - x: i16, - /// latitudinal position, - /// positive numbers are to the North and negative numbers are to the South - y: i16, -} - -impl Point { - /// The sum of the absolute longitudinal and latitudinal distances from the origin - pub fn get_manhattan_distance(&self) -> u16 { - self.x.unsigned_abs() + self.y.unsigned_abs() - } -} - -impl NavigationInstruction { - /// Interpret the instruction to move the ferry - /// - /// Parameters - /// - `bearing` - (degrees) the direction the ferry is currently facing. - /// 0° means it's facing North, - /// 90° means it's facing East, - /// 180° means it's facing South, - /// 270° means it's facing West, - /// - `position` - the current position of the ferry - /// - /// Returns - /// - `Ok` - the ferry's new bearing and new position - /// - `Err` - if the instruction is to move "forward" but the provided `bearing` is not - /// supported - pub fn move_ship(&self, bearing: u16, position: Point) -> Result<(u16, Point), String> { - match self.action { - North => Ok(( - bearing, - Point { - x: position.x, - y: position.y + self.value, - }, - )), - South => Ok(( - bearing, - Point { - x: position.x, - y: position.y - self.value, - }, - )), - East => Ok(( - bearing, - Point { - x: position.x + self.value, - y: position.y, - }, - )), - West => Ok(( - bearing, - Point { - x: position.x - self.value, - y: position.y, - }, - )), - Left => { - let relative_bearing = bearing as i16 - self.value; - let bearing = if relative_bearing < 0 { - (relative_bearing + 360) as u16 - } else { - relative_bearing as u16 - }; - Ok((bearing, position)) - } - Right => Ok(((bearing + self.value as u16) % 360, position)), - Forward => match bearing { - 0 => Ok(( - bearing, - Point { - x: position.x, - y: position.y + self.value, - }, - )), - 90 => Ok(( - bearing, - Point { - x: position.x + self.value, - y: position.y, - }, - )), - 180 => Ok(( - bearing, - Point { - x: position.x, - y: position.y - self.value, - }, - )), - 270 => Ok(( - bearing, - Point { - x: position.x - self.value, - y: position.y, - }, - )), - _ => Err("Unsupported bearing: ".to_owned() + &bearing.to_string()), - }, - } - } - - /// Interpret the instruction to move the ferry's waypoint and possibly also the ferry itself - /// - /// Parameters - /// - `waypoint` - the current position of the ferry's waypoint - /// - `ship` - the current position of the ferry - /// - /// Returns - The new positions of the waypoint and the ferry - pub fn move_ship_using_waypoint(&self, waypoint: Point, ship: Point) -> (Point, Point) { - match self.action { - North => ( - Point { - x: waypoint.x, - y: waypoint.y + self.value, - }, - ship, - ), - South => ( - Point { - x: waypoint.x, - y: waypoint.y - self.value, - }, - ship, - ), - East => ( - Point { - x: waypoint.x + self.value, - y: waypoint.y, - }, - ship, - ), - West => ( - Point { - x: waypoint.x - self.value, - y: waypoint.y, - }, - ship, - ), - Left => { - // rotate the waypoint around the ship, anti-clockwise (when viewed from above), - // by the number of degrees specified in the instruction - - // capture the vector between the waypoint and the ship - let mut longitudinal_difference = waypoint.x - ship.x; - let mut latitudinal_difference = waypoint.y - ship.y; - - // relocate the waypoint relative to the ship - let mut waypoint = Point { - x: waypoint.x, - y: waypoint.y, - }; - for _ in 0..self.value / 90 { - waypoint.x = ship.x - latitudinal_difference; - waypoint.y = ship.y + longitudinal_difference; - longitudinal_difference = waypoint.x - ship.x; - latitudinal_difference = waypoint.y - ship.y; - } - (waypoint, ship) - } - Right => { - // rotate the waypoint around the ship clockwise (when viewed from above), - // by the number of degrees specified in the instruction - - // capture the vector between the waypoint and the ship - let mut longitudinal_difference = waypoint.x - ship.x; - let mut latitudinal_difference = waypoint.y - ship.y; - - // relocate the waypoint relative to the ship - let mut waypoint = Point { - x: waypoint.x, - y: waypoint.y, - }; - for _ in 0..self.value / 90 { - waypoint.x = ship.x + latitudinal_difference; - waypoint.y = ship.y - longitudinal_difference; - longitudinal_difference = waypoint.x - ship.x; - latitudinal_difference = waypoint.y - ship.y; - } - (waypoint, ship) - } - Forward => { - // capture the vector between the waypoint and the ship - let longitudinal_difference = waypoint.x - ship.x; - let latitudinal_difference = waypoint.y - ship.y; - - let mut waypoint = Point { - x: waypoint.x, - y: waypoint.y, - }; - let mut ship = Point { - x: ship.x, - y: ship.y, - }; - - ship.x += longitudinal_difference * self.value; - ship.y += latitudinal_difference * self.value; - - // "The waypoint is relative to the ship; that is, if the ship moves, the waypoint - // moves with it." - waypoint.x = ship.x + longitudinal_difference; - waypoint.y = ship.y + latitudinal_difference; - - (waypoint, ship) - } - } - } -} - -pub fn get_instructions() -> impl Iterator> { - get_lines("day-12-input.txt") - .map(|line| line.parse::()) - .map(|parse_result| parse_result.map_err(|error| error.to_string())) -} - -#[cfg(test)] -mod tests { - use crate::day12::{get_instructions, Point}; - - #[test] - fn part1() { - let (_, position) = get_instructions() - .try_fold( - (90u16, Point { x: 0, y: 0 }), // "The ship starts by facing east." - |coordinates, result| { - result - .and_then(|instruction| instruction.move_ship(coordinates.0, coordinates.1)) - }, - ) - .expect("Invalid instruction found"); - - println!("Part 1: {}", position.get_manhattan_distance()); - } - - #[test] - fn part2() { - let (_, ship) = get_instructions() - // "The waypoint starts 10 units east and 1 unit north relative to the ship." - .try_fold( - (Point { x: 10, y: 1 }, Point { x: 0, y: 0 }), - |positions, result| { - result.map(|instruction| { - instruction.move_ship_using_waypoint(positions.0, positions.1) - }) - }, - ) - .expect("Invalid instruction found"); - println!("Part 2: {}", ship.get_manhattan_distance()); - } -} diff --git a/src/day13.rs b/src/day13.rs deleted file mode 100644 index d235d3e..0000000 --- a/src/day13.rs +++ /dev/null @@ -1,263 +0,0 @@ -// https://adventofcode.com/2020/day/13 - -use core::fmt; -use std::cmp::Ordering; -use std::fmt::{Display, Formatter}; -use std::num::ParseIntError; - -use crate::get_lines; - -use crate::day13::ParseError::{ - EarliestDepartureNotSpecified, InvalidBusId, InvalidDepartureTime, NoBusesSpecified, -}; - -/// A shuttle bus that departs from the sea port, travels to the airport, then several other -/// destinations, then returns to the sea port -#[derive(Debug, Copy, Clone)] -pub struct Bus { - /// The time it takes the bus to complete a circuit in minutes, which also uniquely identifies - /// the bus - id: u16, - - /// The bus' position in the time table - index: usize, -} - -impl Bus { - /// Determine how long a passenger would have to wait (in minutes) to board this bus at the sea - /// port. - /// - /// Parameters: - /// - `earliest_departure` - the earliest time (in minutes) at which the passenger can board - /// _any_ bus at the sea port - /// - /// Returns: the amount of time in minutes the passenger would have to wait for this particular - /// bus - fn get_time_to_wait(&self, earliest_departure: u32) -> u32 { - let missed_count: u32 = earliest_departure / self.id as u32; // round down - ((missed_count + 1) * self.id as u32) - earliest_departure - } -} - -impl Display for Bus { - fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - write!(f, "Bus( id: {}, index: {} )", self.id, self.index) - } -} - -impl Eq for Bus {} - -impl PartialEq for Bus { - fn eq(&self, other: &Self) -> bool { - self.id == other.id - } -} - -/// A bus that **a specific passenger** is considering boarding from the sea port -#[derive(Debug, Copy, Clone)] -pub struct BusCandidate { - /// The bus under consideration - bus: Bus, - - /// The earliest time the passenger can board _any_ bus from the sea port - earliest_departure: u32, - - /// The amount of time the passenger would need to wait for this particular bus at the sea port - time_to_wait: u32, -} - -impl Display for BusCandidate { - fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - write!( - f, - "BusCandidate( bus: {}, earliest_departure: {}, time_to_wait: {}", - self.bus, self.earliest_departure, self.time_to_wait - ) - } -} - -impl Eq for BusCandidate {} - -impl PartialEq for BusCandidate { - fn eq(&self, other: &Self) -> bool { - self.bus == other.bus - } -} - -impl PartialOrd for BusCandidate { - fn partial_cmp(&self, other: &Self) -> Option { - Some(self.cmp(other)) - } -} - -impl Ord for BusCandidate { - fn cmp(&self, other: &Self) -> Ordering { - self.time_to_wait.cmp(&other.time_to_wait) - } -} - -/// An error that could arise from parsing the problem input -#[derive(Debug, Clone)] -pub enum ParseError { - InvalidBusId(ParseIntError), - EarliestDepartureNotSpecified, - InvalidDepartureTime(ParseIntError), - NoBusesSpecified, -} - -/// Parse a bus time table on behalf of a specific passenger. -/// -/// Parameters: -/// - `earliest_departure` - The earliest time in minutes the passenger can board a shuttle bus -/// - `string` - A comma-delimited bus time table. Each entry will either be an 'x' representing an -/// out-of-service bus or a bus ID. -/// -/// Returns: All of the bus candidates. For any malformed bus value, a `ParseError` is returned. -fn parse_buses(earliest_departure: u32, string: String) -> Vec> { - string - .split(',') - .enumerate() - .filter(|(_, id)| *id != "x") - .map(|(index, id)| -> Result { - match id.parse::() { - Ok(bus_id) => { - let bus = Bus { id: bus_id, index }; - if earliest_departure % bus_id as u32 == 0 { - return Ok(BusCandidate { - bus, - earliest_departure, - time_to_wait: 0, - }); - } - Ok(BusCandidate { - bus, - earliest_departure, - time_to_wait: bus.get_time_to_wait(earliest_departure), - }) - } - Err(e) => Err(InvalidBusId(e)), - } - }) - .collect() -} - -/// Parse the problem input -/// -/// Returns: -/// - `Ok` - All of the bus candidates given the passenger's earliest departure time -/// - `Err(ParseError)` - The first parsing error encountered. -pub fn parse_input() -> Result, ParseError> { - let mut lines = get_lines("day-13-input.txt"); - let earliest_departure = match lines.next() { - None => return Err(EarliestDepartureNotSpecified), - Some(line) => match line.parse::() { - Err(e) => return Err(InvalidDepartureTime(e)), - Ok(integer) => integer, - }, - }; - let buses = match lines.next() { - None => return Err(NoBusesSpecified), - Some(line) => parse_buses(earliest_departure, line), - }; - - let mut errors = buses - .iter() - .filter(|result| result.is_err()) - .map(move |result| result.as_ref().unwrap_err().to_owned()); - if let Some(error) = errors.next() { - return Err(error); - } - let buses = buses - .iter() - .map(move |result| result.as_ref().unwrap().to_owned()) - .collect::>(); - Ok(buses) -} - -/// Find the modular multiplicative inverse -/// -/// Parameters: -/// - `partial_product` - the number by which the result can be multiplied to yield a value -/// equivalent to `1 (mod mod_space)` -/// - `mod_space` - the modulus -/// -/// Returns: The smallest number _x_ such that `mod_space` evenly divides -/// `( partial_product * x ) - 1`. -pub fn find_inverse(partial_product: u64, mod_space: u16) -> u64 { - let mod_space = mod_space as u64; - let mut multiplier = 1u64; - loop { - if (partial_product * multiplier) % mod_space == 1 { - return multiplier; - } - multiplier += 1; - } -} - -#[cfg(test)] -mod tests { - use crate::day13::{find_inverse, parse_input, Bus}; - - /// Find the earliest bus you can take to the airport. - #[test] - fn part1() { - let mut buses = parse_input().expect("Error parsing input"); - buses.sort(); - let first_bus = buses.first(); - let first_bus = first_bus.expect("No buses found."); - let result = first_bus.bus.id as u32 * first_bus.time_to_wait; - println!("Part 1: {}", result); - } - - /// Find the earliest timestamp such that the first bus departs at that time and each subsequent - /// listed bus departs at that subsequent minute. - #[test] - fn part2() { - let buses = parse_input() - .expect("Error parsing input") - .iter() - .map(|candidate| candidate.bus) - .collect::>(); - - // Apply the Chinese Remainder Theorem - // Treat each bus as a modular expression of the form `x ≡ id - index (mod id)`. - // Solve for _x_. - - // For each bus, multiply its placement (index) in the mod space (circuit time), the product - // of the other mod spaces, and its inverse with regard to the other mod spaces, then sum - // the result. This is _a_ timestamp at which each bus departs offset by its position in the - // time table. However, initially, it will not contain the earliest departure time. - let mut sum = 0u64; - - // Multiply all of the mod spaces (circuit times or bus IDs) to yield the spacing between - // each possible solution. - let mut product_of_mod_spaces = 1u64; - for bus in buses.clone() { - product_of_mod_spaces *= bus.id as u64; - - // Multiply by all of the other mod spaces (circuit times or bus IDs) in order to cancel - // them out while applying `mod bus_id`. - let product_of_other_mod_spaces = buses - .clone() - .iter() - .filter(|other| **other != bus) - .fold(1u64, |acc, other| acc * other.id as u64); - - let inverse = find_inverse(product_of_other_mod_spaces, bus.id); - - let index = bus.index as u16; - if bus.id > bus.index as u16 { - let remainder = ((bus.id - index) % bus.id) as u64; - sum += remainder * product_of_other_mod_spaces * inverse; - } else { - let remainder = ((index - bus.id) % bus.id) as u64; - sum -= remainder * product_of_other_mod_spaces * inverse; - } - } - // Repeatedly subtract the product of all the mod spaces to find the earliest possible - // departure time that satisfies the constraints. - let iteration = sum / product_of_mod_spaces; - sum -= product_of_mod_spaces * iteration; - println!("Part 2: {}", sum); - } -} diff --git a/src/day14.rs b/src/day14.rs deleted file mode 100644 index 21e13c5..0000000 --- a/src/day14.rs +++ /dev/null @@ -1,272 +0,0 @@ -// https://adventofcode.com/2020/day/14 - -use std::num::ParseIntError; -use std::ops::BitXor; -use std::str::FromStr; - -use regex::Regex; - -use crate::day14::Command::{SetMask, SetMemory}; -use crate::day14::ParseError::{ - InvalidAddress, InvalidInstruction, InvalidMask, InvalidValue, MissingLeftValue, - MissingRightValue, -}; -use crate::get_lines; - -/// An instruction in the sea port's computer system initialisation programme -/// -/// A ferry will use a series of commands to dock at the sea port. -pub enum Command { - /// Update the current bit mask - /// Parameters: - /// - bitmask - A 36-character String containing only the characters '0', '1', or 'X'. - /// The most significant bit is to the left and the least significant bit is to the - /// right. - SetMask(String), - - /// Update the program's memory - /// Parameters - /// - `address` - /// - `value` - SetMemory(u64, u64), -} - -/// An error that may be raised when parsing the initialisation programme. -#[derive(Debug)] -pub enum ParseError { - MissingLeftValue(String), - MissingRightValue(String), - InvalidInstruction(String), - InvalidAddress(String), - InvalidValue(ParseIntError), - InvalidMask(String), -} - -/// Apply a mask to an integer value prior to storing it in memory. This is used by version 1 of the -/// ferry's docking programme decoder chip. -/// -/// Parameters -/// - `mask` - a 36-bit, big-endian mask consisting of the characters '0', '1', and 'X' -/// - `value` - a 36-bit, unsigned integer (the most-significant 28 bits are unmasked) -/// -/// Returns: The result of masking the least-significant 36 bits -pub fn mask_value(mask: &str, value: &u64) -> u64 { - let mask_chars = mask.chars().collect::>(); - (0..36usize).fold(*value, |result, i| -> u64 { - let flag = 1u64 << i; - let mask_value = mask_chars.get(mask.len() - i - 1).expect("Invalid mask"); - match mask_value { - 'X' => result, // "an X leaves the bit in the value unchanged" - '0' => result & std::u64::MAX.bitxor(flag), - '1' => result | flag, - _ => panic!("Invalid mask value: {}", mask_value), - } - }) -} - -/// Apply a mask to a memory address. This is used by version 2 of the ferry's docking programme -/// decoder chip. -/// -/// Parameters: -/// - `mask` - a 36-bit, big-endian mask consisting of the characters '0', '1', and 'X' -/// - `address` - a 36-bit, unsigned integer representing a memory address (the most-significant 28 -/// bits are unmasked) -/// -/// Returns: All the memory addresses that should be updated -pub fn mask_address(mask: &str, address: &u64) -> Vec { - let mask_chars = mask.chars().collect::>(); - let spec = (0..36usize) - .map(|i| -> char { - let mask_value = mask_chars.get(mask.len() - i - 1).expect("Invalid mask"); - let address_value = (address & (1 << i)) >> i; - match mask_value { - // "If the bitmask bit is X, the corresponding memory address bit is floating." - // "If the bitmask bit is 1, the corresponding memory address bit is overwritten with - // 1." - 'X' | '1' => mask_value.to_owned(), - // "If the bitmask bit is 0, the corresponding memory address bit is unchanged." - '0' => address_value - .to_string() - .chars() - .next() - .expect("Invalid address bit"), - _ => panic!("Invalid mask value: {}", mask_value), - } - }) - .collect::>(); - explode(spec) -} - -/// Expand an address specification into all the matching addresses. -/// -/// Parameters: -/// - `spec` - a 36-character address specification consisting of the characters '0', '1', and 'X' -/// For every 'X', two variants will be generated, one in which it is replaced by '0', -/// and one in which it is replaced by '1'. -/// -/// Returns: All the possible memory locations. The length is 2^(number of Xs in `spec`). -fn explode(spec: Vec) -> Vec { - let floating_indices = spec - .iter() - .enumerate() - .filter_map(|(index, bit)| if *bit == 'X' { Some(index) } else { None }) - .collect::>(); - explode_indices(spec, floating_indices.as_slice()) -} - -/// Expand an address specification into all the matching addresses. -/// -/// Parameters: -/// - `spec` - a 36-character address specification consisting of the characters '0', '1', and 'X' -/// For every 'X', two variants will be generated, one in which it is replaced by '0', -/// and one in which it is replaced by '1'. -/// - `floating_indices` - the indices of every 'X' in `spec`. -/// -/// Returns: All the possible memory locations. The length is 2^floating_indices.len(). -fn explode_indices(spec: Vec, floating_indices: &[usize]) -> Vec { - if floating_indices.is_empty() { - return vec![to_int(spec)]; - } - let floating_index = floating_indices[0]; - let mut result: Vec = Vec::new(); - let mut copy = spec; - let sub = floating_indices.split_at(1).1; - copy[floating_index] = '0'; - explode_indices(copy.clone(), sub) - .iter() - .for_each(|address| result.push(*address)); - copy[floating_index] = '1'; - explode_indices(copy, sub) - .iter() - .for_each(|address| result.push(*address)); - result -} - -/// Convert a vector of 0s and 1s to an integer. -/// -/// Parameters: -/// - `chars` - a vector of length 36 for which each character is either '0' or '1'. -/// -/// Returns: the integer representation of `chars` -fn to_int(chars: Vec) -> u64 { - (0..36usize).fold(0u64, |result, i| -> u64 { - let bit = chars[i]; - match bit { - '0' => result, - '1' => result | (1u64 << i), - _ => panic!("Invalid bit: {}", bit), - } - }) -} - -impl FromStr for Command { - type Err = ParseError; - - fn from_str(line: &str) -> Result { - let mut components = line.splitn(2, " = "); - let left_value = match components.next() { - None => return Err(MissingLeftValue(line.to_owned())), - Some(string) => string.trim(), - }; - let right_value = match components.next() { - None => return Err(MissingRightValue(line.to_owned())), - Some(string) => string.trim(), - }; - match left_value { - "mask" => { - let mask = right_value.to_owned(); - if right_value.len() != 36 { - // "The bitmask is always given as a string of 36 bits" - return Err(InvalidMask(mask)); - } - if right_value - .chars() - .any(|c| c != '0' && c != '1' && c != 'X') - { - return Err(InvalidMask(mask)); - } - Ok(SetMask(mask)) - } - _ => { - lazy_static! { - /// A regular expression that matches a memory-assignment lvalue. - /// It includes a single capture group that contains the memory address. - static ref MEM: Regex = Regex::new("mem\\[([0-9]+)\\]").unwrap(); - } - match MEM.captures(left_value) { - None => Err(InvalidInstruction(left_value.to_owned())), - Some(captures) => { - if let Some(matcher) = captures.get(1) { - match matcher.as_str().parse::() { - Err(_) => return Err(InvalidAddress(matcher.as_str().to_owned())), - Ok(address) => match right_value.parse::() { - Err(e) => Err(InvalidValue(e)), - Ok(value) => Ok(SetMemory(address, value)), - }, - } - } else { - Err(InvalidAddress(left_value.to_owned())) - } - } - } - } - } - } -} - -/// Parse the puzzle input -pub fn parse_initialisation_programme() -> impl Iterator { - get_lines("day-14-input.txt") - .map(|line| line.parse::()) - .map(|result| result.expect("Unparseable line")) -} - -#[cfg(test)] -mod tests { - use std::collections::HashMap; - - use crate::day14::{mask_address, mask_value, parse_initialisation_programme, Command}; - - #[test] - fn part1() { - let (memory, _) = parse_initialisation_programme().fold( - (HashMap::new(), "X".repeat(36)), - move |mut state, command| -> (HashMap, String) { - match command { - Command::SetMask(mask) => (state.0, mask), - Command::SetMemory(address, value) => { - let value = mask_value(&state.1, &value); - state.0.insert(address, value); - state - } - } - }, - ); - // "To initialize your ferry's docking program, you need the sum of all values left in - // memory after the initialization program completes." - let result = memory.values().sum::(); - println!("Part 1: {}", result); - } - - #[test] - fn part2() { - let (memory, _) = parse_initialisation_programme().fold( - (HashMap::new(), "0".repeat(36)), - move |mut state, command| -> (HashMap, String) { - match command { - Command::SetMask(mask) => (state.0, mask), - Command::SetMemory(address, value) => { - mask_address(&state.1, &address).iter().for_each(|address| { - state.0.insert(address.to_owned(), value); - }); - state - } - } - }, - ); - // "To initialize your ferry's docking program, you need the sum of all values left in - // memory after the initialization program completes." - let result = memory.values().sum::(); - println!("Part 2: {}", result); - } -} diff --git a/src/day15.rs b/src/day15.rs deleted file mode 100644 index 72cee92..0000000 --- a/src/day15.rs +++ /dev/null @@ -1,133 +0,0 @@ -// https://adventofcode.com/2020/day/15 - -use std::collections::hash_map::{Entry, RandomState}; -use std::collections::HashMap; -use std::hash::{BuildHasher, BuildHasherDefault}; - -use hashers::fx_hash::FxHasher; - -use crate::get_lines; - -/// Parse the puzzle input -/// -/// *Panics* if any of the input numbers are not valid array indices -pub fn parse_numbers() -> Vec { - get_lines("day-15-input.txt") - .flat_map(|line| { - line.split(',') - .map(|slice| slice.to_owned()) - .collect::>() - }) - .map(|string| string.parse::()) - .map(|result| result.expect("Invalid number")) - .collect() -} - -/// A variant of [Van Eck's sequence](http://oeis.org/A181391) that starts with a specific seed of -/// numbers. -/// -/// This Iterator has as many elements as the maximum value of a `usize`. -/// -/// Parameters: -/// - `S` - the hash function to use for keeping track of the last time a number was spoken -pub struct VanEckSequence { - /// the first items in the sequence - seed: Vec, - /// A mapping of sequence value to the last index into the sequence at which it appeared - oral_history: HashMap, - /// The index of the _next_ number to speak - index: usize, - last_number_spoken: usize, -} - -impl VanEckSequence { - /// Create a new sequence - /// - /// Parameters: - /// - `seed` - the first items in the sequence. - /// - `oral_history` - a cache to store the last time each number was spoken. - fn with_cache(seed: Vec, oral_history: HashMap) -> VanEckSequence { - VanEckSequence { - seed, - oral_history, - index: 0usize, - last_number_spoken: 0usize, - } - } -} - -impl VanEckSequence> { - /// Create a new sequence - /// - /// Parameters: - /// - `seed` - the first items in the sequence. - pub fn new(seed: Vec) -> VanEckSequence> { - VanEckSequence::with_cache( - seed, - HashMap::with_hasher(BuildHasherDefault::::default()), - ) - } -} - -impl Iterator for VanEckSequence { - type Item = usize; - - fn next(&mut self) -> Option { - let next_number_to_speak = if self.index < self.seed.len() { - let next_number_to_speak = self.seed[self.index]; - self.oral_history - .insert(next_number_to_speak, self.index + 1); - next_number_to_speak - } else { - match self.oral_history.entry(self.last_number_spoken) { - Entry::Occupied(mut entry) => { - let last_mention = entry.insert(self.index); - self.index - last_mention - } - Entry::Vacant(entry) => { - entry.insert(self.index); - 0usize - } - } - }; - - self.index += 1; - self.last_number_spoken = next_number_to_speak; - Some(next_number_to_speak) - } -} - -/// Get the last number spoken after playing the Elves' memory game for _num_rounds_ turns. -/// -/// Parameters: -/// - `num_rounds` - the number of turns in the game. Each turn involves a player speaking one -/// number. -/// -/// Returns: The last number spoken after the specified number of turns/rounds. -pub fn get_last_number_spoken(num_rounds: usize) -> usize { - let numbers = parse_numbers(); - VanEckSequence::new(numbers) - .nth(num_rounds - 1) - .expect("Sequence should be unbounded") -} - -#[cfg(test)] -mod tests { - use crate::day15::get_last_number_spoken; - - #[test] - fn part1() { - // "Their question for you is: what will be the 2020th number spoken?" - let num_rounds = 2020usize; - let last_number_spoken = get_last_number_spoken(num_rounds); - println!("Part 1: {}", last_number_spoken); - } - - #[test] - fn part2() { - // "Impressed, the Elves issue you a challenge: determine the 30,000,000th number spoken." - let num_rounds = 30_000_000usize; - let last_number_spoken = get_last_number_spoken(num_rounds); - println!("Part 2: {}", last_number_spoken); - } -} diff --git a/src/day16.rs b/src/day16.rs deleted file mode 100644 index 92e7bd5..0000000 --- a/src/day16.rs +++ /dev/null @@ -1,256 +0,0 @@ -// --- Day 16: Ticket Translation --- -// https://adventofcode.com/2020/day/16 - -use std::collections::HashSet; -use std::hash::{Hash, Hasher}; -use std::ops::Range; - -use crate::get_lines; - -/// A high-speed train ticket -pub struct Ticket { - /// The numbers that appear on the ticket in the order that they appear - numbers: Vec, -} - -impl Ticket { - /// Determine if the ordered list of numbers represents a valid ticket given the field - /// definitions. - /// - /// Parameters - /// - `fields` - the known rules that ticket fields must follow - /// - /// Returns: true if and only if this ticket satisfies the specified rules - pub fn is_valid(&self, fields: &HashSet) -> bool { - self.get_invalid_numbers(fields).is_empty() - } - - /// Find all of the numbers on the ticket that cannot be valid - /// - /// Parameters - /// - `fields` the known rules that ticket fields must follow - /// - /// Returns: all of the numbers on the ticket that cannot correspond to any of the fields - fn get_invalid_numbers(&self, fields: &HashSet) -> Vec { - /* - Using a generator here would be ideal once that feature is stable: - https://doc.rust-lang.org/std/ops/trait.Generator.html . - This will allow us to support short-circuiting - */ - let mut result: Vec = Vec::new(); - 'outer: for number in self.numbers.iter() { - for field in fields.iter() { - if field.contains(*number) { - continue 'outer; - } - } - result.push(*number); - } - result - } -} - -/// The rules for a ticket field -#[derive(Eq, Clone)] -pub struct Field { - /// The name of the field - label: String, - - /// The valid ranges for this field on a ticket - ranges: Vec>, -} - -impl Field { - /// Determine if this field can contain a certain number - /// - /// Parameters - /// - `number` - a number on a ticket - /// - /// Returns: true if and only if the number _can_ correspond to this field - pub fn contains(&self, number: usize) -> bool { - self.ranges.iter().any(|range| range.contains(&number)) - } -} - -impl Hash for Field { - fn hash(&self, state: &mut H) { - self.label.hash(state); - state.finish(); - } -} - -impl PartialEq for Field { - fn eq(&self, other: &Self) -> bool { - self.label.eq(&other.label) - } -} - -/// Parse the problem input -/// -/// Returns a tuple with the following values: -/// - The high-speed train ticket assigned to you -/// - the valid ranges for the ticket fields -/// - the numbers on all the nearby tickets, sourced via the airport security cameras -pub fn get_input() -> (Ticket, HashSet, Vec) { - let mut fields: HashSet = HashSet::new(); - let mut nearby_tickets: Vec = Vec::new(); - - let mut section = 0u8; - let mut my_ticket: Option = None; - for line in get_lines("day-16-input.txt") { - if line.is_empty() { - section += 1; - continue; - } else if line.trim().eq_ignore_ascii_case("your ticket:") - || line.trim().eq_ignore_ascii_case("nearby tickets:") - { - continue; - } - match section { - 0 => { - let mut sections = line.splitn(2, ": "); - let label = sections - .next() - .expect("Expected field label and ranges delimited by \": \"") - .trim() - .to_owned(); - let ranges = sections - .next() - .expect("No ranges specified") - .trim() - .split(" or ") - .map(|string| -> Range { - let mut bounds = string.splitn(2, '-'); - let start = bounds - .next() - .expect("Missing lower bound of range") - .trim() - .parse::() - .expect("Cannot parse range start."); - let end = bounds - .next() - .expect("Missing upper bound of range") - .trim() - .parse::() - .expect("Cannot parse range end.") - + 1; - Range { start, end } - }) - .collect::>>(); - fields.insert(Field { label, ranges }); - } - 1 => { - my_ticket = Some(Ticket { - numbers: line - .split(',') - .map(|section| { - section - .trim() - .parse::() - .expect("Cannot parse ticket number.") - }) - .collect::>(), - }); - } - 2 => { - nearby_tickets.push(Ticket { - numbers: line - .split(',') - .map(|section| { - section - .trim() - .parse::() - .expect("Cannot parse nearby ticket number.") - }) - .collect::>(), - }); - } - _ => panic!("Unexpected section starting with: {}", line), - } - } - ( - my_ticket.expect("Ticket not issued."), - fields, - nearby_tickets, - ) -} - -#[cfg(test)] -mod tests { - use std::collections::{HashMap, HashSet}; - - use crate::day16::{get_input, Field, Ticket}; - - #[test] - fn part1() { - let (_, fields, nearby_tickets) = get_input(); - let ticket_scanning_error_rate: usize = nearby_tickets - .iter() - .flat_map(|ticket| ticket.get_invalid_numbers(&fields)) - .sum(); - println!("Part 1: {}", ticket_scanning_error_rate); - } - - #[test] - fn part2() { - let (my_ticket, fields, nearby_tickets) = get_input(); - - // "Now that you've identified which tickets contain invalid values, discard those tickets - // entirely. Use the remaining valid tickets to determine which field is which." - let valid_tickets = nearby_tickets - .iter() - .filter(|candidate| candidate.is_valid(&fields)) - .collect::>(); - - // "Using the valid ranges for each field, determine what order the fields appear on the - // tickets. The order is consistent between all tickets" - let mut unmapped_indices = (0..my_ticket.numbers.len()).collect::>(); - let mut field_table: HashMap = HashMap::new(); - let mut unmapped_fields = fields.iter().collect::>(); - while !unmapped_fields.is_empty() { - let mut indices_to_remove: HashSet = HashSet::new(); - for field_index in &unmapped_indices { - let mut candidates = unmapped_fields.clone(); - let mut to_remove: HashSet<&Field> = HashSet::new(); - for ticket in &valid_tickets { - let number = ticket.numbers[*field_index]; - for potential_field in &candidates { - if !potential_field.contains(number) { - to_remove.insert(potential_field); - } - } - for disqualified in &to_remove { - candidates.remove(disqualified); - } - } - if candidates.is_empty() { - panic!("No candidate fields for index: {}", field_index); - } else if candidates.len() == 1 { - // map candidate to index - let field = candidates - .drain() - .next() - .expect("There should be exactly one candidate."); - field_table.insert(field.label.clone(), *field_index); - unmapped_fields.remove(&field); - indices_to_remove.insert(*field_index); - } - } - for index in indices_to_remove { - unmapped_indices.remove(&index); - } - } - // "Once you work out which field is which, look for the six fields on your ticket that - // start with the word departure. What do you get if you multiply those six values - // together?" - let numbers = &my_ticket.numbers; - let product = field_table - .iter() - .filter(|(label, _)| label.starts_with("departure")) - .map(|(_, number)| *number) - .map(|number| numbers[number]) - .reduce(|x, y| x * y) - .expect("Unable to deduce any field position mappings"); - println!("Part 2: {}", product); - } -} diff --git a/src/day17.rs b/src/day17.rs deleted file mode 100644 index 8f9d703..0000000 --- a/src/day17.rs +++ /dev/null @@ -1,431 +0,0 @@ -// --- Day 17: Conway Cubes --- -// https://adventofcode.com/2020/day/17 - -use std::cmp; -use std::collections::{HashMap, HashSet}; - -use rayon::prelude::*; - -use crate::get_lines; - -/// A signed integer for indexing into an infinite 3-dimensional space -/// -/// This can be sized to accommodate the maximum-needed distance from the origin. -type Int = i8; - -/// The location of a Conway Cube in three-dimensional space -/// -/// Each location has 26 adjacent neighbours. -#[derive(PartialEq, Eq, Hash, Copy, Clone)] -pub struct SpatialCoordinate { - x: Int, - y: Int, - z: Int, -} - -impl SpatialCoordinate { - /// Find the coordinate at the specified offset - /// - /// Returns: - /// - `None` - if all the offsets are zero - /// - `Some(SpatialCoordinate)` - The coordinate at the specified offset - pub fn offset(&self, x_offset: Int, y_offset: Int, z_offset: Int) -> Option { - if x_offset == 0 && y_offset == 0 && z_offset == 0 { - None - } else { - Some(SpatialCoordinate { - x: self.x + x_offset, - y: self.y + y_offset, - z: self.z + z_offset, - }) - } - } -} - -/// The location of a Hyper Conway Cube in four-dimensional space -/// -/// Each location has 80 adjacent neighbours. -#[derive(PartialEq, Eq, Hash, Copy, Clone)] -pub struct SpaceTimeCoordinate { - x: Int, - y: Int, - z: Int, - w: Int, -} - -impl SpaceTimeCoordinate { - /// Find the coordinate at the specified offset - /// - /// Returns: - /// - `None` - if all the offsets are zero - /// - `Some(SpatialCoordinate)` - The coordinate at the specified offset - pub fn offset( - &self, - x_offset: Int, - y_offset: Int, - z_offset: Int, - w_offset: Int, - ) -> Option { - if x_offset == 0 && y_offset == 0 && z_offset == 0 && w_offset == 0 { - None - } else { - Some(SpaceTimeCoordinate { - x: self.x + x_offset, - y: self.y + y_offset, - z: self.z + z_offset, - w: self.w + w_offset, - }) - } - } -} - -/// Identifies the boundaries of the known space for a single dimension -/// -/// Note that during a cycle, the cubes one unit beyond the bounds *may* update. -#[derive(Debug)] -pub struct Bounds { - /// The lower bound, inclusive and strictly less than or equal to `upper` - lower: Int, - /// The upper bound, inclusive and strictly greater than or equal to `lower` - upper: Int, -} - -/// An infinite, 3-dimensional grid of Conway Cubes. Each cube is either active or inactive as -/// represented by a `bool`. -pub struct SpatialGrid { - x_bounds: Bounds, - y_bounds: Bounds, - z_bounds: Bounds, - map: HashMap>>, -} - -impl SpatialGrid { - pub fn new(known_cubes: Vec) -> SpatialGrid { - let mut map = HashMap::new(); - let mut x_min: Int = 0; - let mut x_max: Int = 0; - let mut y_min: Int = 0; - let mut y_max: Int = 0; - let mut z_min: Int = 0; - let mut z_max: Int = 0; - - for coordinate in known_cubes { - let x_dimension = map.entry(coordinate.x).or_insert_with(HashMap::new); - let y_dimension = x_dimension.entry(coordinate.y).or_insert_with(HashSet::new); - y_dimension.insert(coordinate.z); - - x_min = cmp::min(x_min, coordinate.x); - x_max = cmp::max(x_max, coordinate.x); - y_min = cmp::min(y_min, coordinate.y); - y_max = cmp::max(y_max, coordinate.y); - z_min = cmp::min(z_min, coordinate.z); - z_max = cmp::max(z_max, coordinate.z); - } - - SpatialGrid { - x_bounds: Bounds { - lower: x_min, - upper: x_max, - }, - y_bounds: Bounds { - lower: y_min, - upper: y_max, - }, - z_bounds: Bounds { - lower: z_min, - upper: z_max, - }, - map, - } - } - - /// Returns: the total number of active Conway Cubes in the unbounded grid - pub fn count_active(&self) -> usize { - self.map - .values() - .map(|x_dimension| -> usize { x_dimension.values().map(HashSet::len).sum() }) - .sum() - } - - /// Determine if the Conway Cube at the given three-dimensional coordinates is active or not. - fn is_active(&self, coordinates: &SpatialCoordinate) -> bool { - if let Some(x_dimension) = self.map.get(&coordinates.x) { - if let Some(y_dimension) = x_dimension.get(&coordinates.y) { - return y_dimension.contains(&coordinates.z); - } - } - false - } - - /// Create a new generation from the current one. - /// - /// Returns: a new Grid based on the evaluation of the current state - pub fn cycle(&self) -> SpatialGrid { - let known_cubes = (&self.x_bounds.lower - 1..=&self.x_bounds.upper + 1) - .into_par_iter() - .flat_map(move |x| { - (&self.y_bounds.lower - 1..=&self.y_bounds.upper + 1) - .into_par_iter() - .flat_map(move |y| { - (&self.z_bounds.lower - 1..=&self.z_bounds.upper + 1) - .into_par_iter() - .flat_map(move |z| { - let coordinate = SpatialCoordinate { x, y, z }; - if self.cycle_cube(&coordinate) { - Some(coordinate) - } else { - None - } - }) - }) - }) - .collect::>(); - SpatialGrid::new(known_cubes) - } - - fn cycle_cube(&self, coordinates: &SpatialCoordinate) -> bool { - let active_neighbours = self - .get_neighbouring_coordinates(coordinates) - .filter(|neighbour| self.is_active(neighbour)) - .count(); - if self.is_active(coordinates) { - active_neighbours == 2 || active_neighbours == 3 - } else { - active_neighbours == 3 - } - } - - fn get_neighbouring_coordinates<'a>( - &self, - coordinates: &'a SpatialCoordinate, - ) -> impl Iterator + 'a { - (-1..=1).flat_map(move |x_offset| { - (-1..=1).flat_map(move |y_offset| { - (-1..=1).flat_map(move |z_offset| coordinates.offset(x_offset, y_offset, z_offset)) - }) - }) - } -} - -pub struct SpaceTimeGrid { - x_bounds: Bounds, - y_bounds: Bounds, - z_bounds: Bounds, - w_bounds: Bounds, - - map: HashMap>>>, -} - -impl SpaceTimeGrid { - pub fn new(known_cubes: Vec) -> SpaceTimeGrid { - let mut map = HashMap::new(); - let mut x_min: Int = 0; - let mut x_max: Int = 0; - let mut y_min: Int = 0; - let mut y_max: Int = 0; - let mut z_min: Int = 0; - let mut z_max: Int = 0; - let mut w_min: Int = 0; - let mut w_max: Int = 0; - - for coordinate in known_cubes { - let x_dimension = map.entry(coordinate.x).or_insert_with(HashMap::new); - let y_dimension = x_dimension.entry(coordinate.y).or_insert_with(HashMap::new); - let z_dimension = y_dimension.entry(coordinate.z).or_insert_with(HashSet::new); - z_dimension.insert(coordinate.w); - - x_min = cmp::min(x_min, coordinate.x); - x_max = cmp::max(x_max, coordinate.x); - y_min = cmp::min(y_min, coordinate.y); - y_max = cmp::max(y_max, coordinate.y); - z_min = cmp::min(z_min, coordinate.z); - z_max = cmp::max(z_max, coordinate.z); - w_min = cmp::min(w_min, coordinate.w); - w_max = cmp::max(w_max, coordinate.w); - } - - SpaceTimeGrid { - x_bounds: Bounds { - lower: x_min, - upper: x_max, - }, - y_bounds: Bounds { - lower: y_min, - upper: y_max, - }, - z_bounds: Bounds { - lower: z_min, - upper: z_max, - }, - w_bounds: Bounds { - lower: w_min, - upper: w_max, - }, - map, - } - } - - /// Returns: the total number of active Conway Cubes in the unbounded grid - pub fn count_active(&self) -> usize { - self.map - .values() - .map(|x_dimension| -> usize { - x_dimension - .values() - .map(|y_dimension| -> usize { y_dimension.values().map(HashSet::len).sum() }) - .sum() - }) - .sum() - } - - /// Determine if the Hyper Conway Cube at the given three-dimensional coordinates is active or not. - fn is_active(&self, coordinates: &SpaceTimeCoordinate) -> bool { - if let Some(x_dimension) = self.map.get(&coordinates.x) { - if let Some(y_dimension) = x_dimension.get(&coordinates.y) { - if let Some(z_dimension) = y_dimension.get(&coordinates.z) { - return z_dimension.contains(&coordinates.w); - } - } - } - false - } - - /// Create a new generation from the current one. - /// - /// Returns: a new Grid based on the evaluation of the current state - pub fn cycle(&self) -> SpaceTimeGrid { - let known_cubes = (&self.x_bounds.lower - 1..=&self.x_bounds.upper + 1) - .into_par_iter() - .flat_map(move |x| { - (&self.y_bounds.lower - 1..=&self.y_bounds.upper + 1) - .into_par_iter() - .flat_map(move |y| { - (&self.z_bounds.lower - 1..=&self.z_bounds.upper + 1) - .into_par_iter() - .flat_map(move |z| { - (&self.w_bounds.lower - 1..=&self.w_bounds.upper + 1) - .into_par_iter() - .flat_map(move |w| { - let coordinate = SpaceTimeCoordinate { x, y, z, w }; - if self.cycle_cube(&coordinate) { - Some(coordinate) - } else { - None - } - }) - }) - }) - }) - .collect::>(); - SpaceTimeGrid::new(known_cubes) - } - - fn cycle_cube(&self, coordinates: &SpaceTimeCoordinate) -> bool { - let active_neighbours = self - .get_neighbouring_coordinates(coordinates) - .filter(|neighbour| self.is_active(neighbour)) - .count(); - if self.is_active(coordinates) { - active_neighbours == 2 || active_neighbours == 3 - } else { - active_neighbours == 3 - } - } - - fn get_neighbouring_coordinates<'a>( - &self, - coordinates: &'a SpaceTimeCoordinate, - ) -> impl Iterator + 'a { - (-1..=1).flat_map(move |x_offset| { - (-1..=1).flat_map(move |y_offset| { - (-1..=1).flat_map(move |z_offset| { - (-1..=1).flat_map(move |w_offset| { - coordinates.offset(x_offset, y_offset, z_offset, w_offset) - }) - }) - }) - }) - } -} - -/// Parse the problem input. -/// -/// "In the initial state of the pocket dimension, almost all cubes start inactive. The only -/// exception to this is a small flat region of cubes (your puzzle input); the cubes in this region -/// start in the specified active (#) or inactive (.) state." -pub fn parse_3d_grid() -> SpatialGrid { - let known_cubes = get_lines("day-17-input.txt") - .enumerate() - .flat_map(|(x, line)| { - line.chars() - .enumerate() - .flat_map(|(y, state)| -> Option { - if state == '#' { - Some(SpatialCoordinate { - x: x as Int, - y: y as Int, - z: 0, - }) - } else { - None - } - }) - .collect::>() - }) - .collect::>(); - SpatialGrid::new(known_cubes) -} - -/// Parse the problem input. -/// -/// "In the initial state of the pocket dimension, almost all cubes start inactive. The only -/// exception to this is a small flat region of cubes (your puzzle input); the cubes in this region -/// start in the specified active (#) or inactive (.) state." -pub fn parse_4d_grid() -> SpaceTimeGrid { - let known_cubes = get_lines("day-17-input.txt") - .enumerate() - .flat_map(|(x, line)| { - line.chars() - .enumerate() - .flat_map(|(y, state)| -> Option { - if state == '#' { - Some(SpaceTimeCoordinate { - x: x as Int, - y: y as Int, - z: 0, - w: 0, - }) - } else { - None - } - }) - .collect::>() - }) - .collect::>(); - SpaceTimeGrid::new(known_cubes) -} - -#[cfg(test)] -mod tests { - use crate::day17::{parse_3d_grid, parse_4d_grid}; - - #[test] - fn part1() { - let mut grid = parse_3d_grid(); - for _ in 0..6 { - grid = grid.cycle(); - } - let num_active = grid.count_active(); - println!("Part 1: {}", num_active); - } - - #[test] - fn part2() { - let mut grid = parse_4d_grid(); - for _ in 0..6 { - grid = grid.cycle(); - } - let num_active = grid.count_active(); - println!("Part 2: {}", num_active); - } -} diff --git a/src/day18.rs b/src/day18.rs deleted file mode 100644 index 7fcc93b..0000000 --- a/src/day18.rs +++ /dev/null @@ -1,242 +0,0 @@ -// --- Day 18: Operation Order --- -// https://adventofcode.com/2020/day/18 - -use crate::get_lines; - -type Int = u64; - -/// All of the supported operators -/// -/// All are binary, left-associative operators. -#[derive(Debug, Copy, Clone)] -pub enum Operator { - Add, - Multiply, -} - -/// All of the possible values in a single math problem -#[derive(Eq, PartialEq, Debug)] -pub enum Token { - /// A numerical literal - Number(Int), - - /// An opening parenthesis that indicates the start of an expression that must be evaluated - /// before it can be used by the surrounding expression. A corresponding `EndGroup` token must - /// follow eventually. - StartGroup, - - /// A closing parenthesis indicating the end of an expression that must be evaluated before it - /// can be used by the surrounding expression. A corresponding `StartGroup` token must precede - /// this. - EndGroup, - - /// An infix operator that sums the adjacent expressions - Plus, - - /// An infix operator that produces the product of the adjacent expressions - Times, -} - -/// An element in the postfix representation of a mathematical expression -pub enum Instruction { - /// An instruction to push a number onto the stack - Number(Int), - - /// An instruction to add the top two elements on the stack and push the result - /// This cannot be interpreted as a unary operator. - Add, - - /// An instruction to multiply the top two elements on the stack and push the result - Multiply, -} - -/// Tokenise the problem input -/// -/// Returns: an `Iterator` in which each entry is a mathematical expression using infix notation -pub fn get_input() -> impl Iterator> { - get_lines("day-18-input.txt").map(|line| -> Vec { - line.chars() - .flat_map(|c| -> Option { - match c { - '0'..='9' => Some(Token::Number(c.to_digit(10).unwrap() as Int)), - '+' => Some(Token::Plus), - '*' => Some(Token::Times), - '(' => Some(Token::StartGroup), - ')' => Some(Token::EndGroup), - ' ' => None, - _ => panic!("Invalid char: {}", c), - } - }) - .collect() - }) -} - -/// Convert an expression from infix notation to postfix notation. -/// -/// This uses the Shunting-yard algorithm. -/// -/// Parameters: -/// - `tokens` - a mathematical expression that uses infix notation -/// - `precedences` - a function that returns larger numbers for higher precedence operators -pub fn convert_to_postfix(tokens: Vec, precedence: F) -> Vec -where - F: Fn(&Operator) -> u8, -{ - /// A subset of the tokens stored as operators in the Shunting-yard algorithm - enum Op { - /// An add operation with a precedence value - Add(u8), - - /// A multiplication operation with a precedence value - Multiply(u8), - - /// An indicator of the start of a group - Group, - } - - let mut operators = vec![]; - let mut result = vec![]; - - let process_operator = |current_operator: Op, - current_operator_precedence: u8, - operators: &mut Vec| - -> Vec { - let mut result = vec![]; - while let Some(previous_operator) = operators.last() { - match previous_operator { - Op::Group => break, - Op::Add(previous_operator_precedence) => { - if *previous_operator_precedence >= current_operator_precedence { - operators.pop(); - result.push(Instruction::Add); - } else { - break; - } - } - Op::Multiply(previous_operator_precedence) => { - if *previous_operator_precedence >= current_operator_precedence { - operators.pop(); - result.push(Instruction::Multiply); - } else { - break; - } - } - } - } - operators.push(current_operator); - result - }; - - for token in tokens { - match token { - Token::Number(i) => result.push(Instruction::Number(i)), - Token::StartGroup => operators.push(Op::Group), - Token::EndGroup => loop { - let operator = operators.pop().expect("Unexpected group ending"); - match operator { - Op::Group => break, - Op::Add(_) => { - assert!(!operators.is_empty(), "Missing opening parenthesis"); - result.push(Instruction::Add); - } - Op::Multiply(_) => { - assert!(!operators.is_empty(), "Missing opening parenthesis"); - result.push(Instruction::Multiply); - } - } - }, - Token::Plus => { - let current_operator_precedence = precedence(&Operator::Add); - result.append(&mut process_operator( - Op::Add(current_operator_precedence), - current_operator_precedence, - &mut operators, - )) - } - Token::Times => { - let current_operator_precedence = precedence(&Operator::Multiply); - result.append(&mut process_operator( - Op::Multiply(current_operator_precedence), - current_operator_precedence, - &mut operators, - )) - } - } - } - while !operators.is_empty() { - let operator = operators.pop().unwrap(); - match operator { - Op::Add(_) => result.push(Instruction::Add), - Op::Multiply(_) => result.push(Instruction::Multiply), - Op::Group => panic!("All groups should have been removed by now"), - } - } - result -} - -/// Evaluate a mathematical expression in postfix notation -/// -/// Parameters: -/// - `elements` - The mathematical instructions in postfix order -/// -/// Returns: the result of evaluating the expression -pub fn evaluate(elements: Vec) -> Int { - let mut stack = vec![]; - for element in elements { - match element { - Instruction::Number(i) => stack.push(i), - Instruction::Add => { - let right_value = stack.pop().unwrap(); - let left_value = stack.pop().unwrap(); - stack.push(left_value + right_value); - } - Instruction::Multiply => { - let right_value = stack.pop().unwrap(); - let left_value = stack.pop().unwrap(); - stack.push(left_value * right_value); - } - } - } - stack.pop().unwrap() -} - -#[cfg(test)] -mod tests { - use crate::day18::Operator::{Add, Multiply}; - use crate::day18::{convert_to_postfix, evaluate, get_input, Int}; - - #[test] - fn part1() { - let sum = get_input() - .map(|tokens| { - convert_to_postfix(tokens, |operator| match operator { - // "However, the rules of operator precedence have changed. Rather than - // evaluating multiplication before addition, the operators have the same - // precedence, and are evaluated left-to-right regardless of the order in which - // they appear." - Add => 1, - Multiply => 1, - }) - }) - .map(evaluate) - .sum::(); - println!("Part 1: {}", sum); - } - - #[test] - fn part2() { - let sum = get_input() - .map(|tokens| { - convert_to_postfix(tokens, |operator| match operator { - // "Now, addition and multiplication have different precedence levels, but - // they're not the ones you're familiar with. Instead, addition is evaluated - // before multiplication." - Add => 2, - Multiply => 1, - }) - }) - .map(evaluate) - .sum::(); - println!("Part 2: {}", sum); - } -} diff --git a/src/day19.rs b/src/day19.rs deleted file mode 100644 index 431384f..0000000 --- a/src/day19.rs +++ /dev/null @@ -1,224 +0,0 @@ -// --- Day 19: Monster Messages --- -// https://adventofcode.com/2020/day/19 - -use std::collections::{HashMap, HashSet}; -use std::str::FromStr; - -use crate::day19::Rule::{MatchAll, MatchAnySet, MatchSingleCharacter}; -use crate::get_lines; - -/// A rule that valid messages (or partial messages) should obey -pub enum Rule { - /// The message must match a single character exactly - /// Parameters: - /// - the character to match - MatchSingleCharacter(char), - - /// Each sub rule referenced must match a subsequent portion of the message - /// Parameters: - /// - an ordered list of Rule IDs to match - MatchAll(Vec), - - /// The message must match at least one of the sub-rules - /// Parameters: - /// - two or more rule sets - MatchAnySet(Vec>), // FIXME outer container does not need to be ordered -} - -impl<'a> Rule { - /// Determine if a message matches this rule exactly - /// - /// Parameters: - /// - `message` - the message to evaluate - /// - `rules` - a dictionary of rule ID to rule - /// Returns: true if and only if the message matches this rule in its entirety with no remaining - /// characters. - pub fn matches(&self, message: &'a str, rules: &HashMap) -> bool { - let mut prefixes = HashSet::new(); - prefixes.insert(message); - self.matching_suffixes(&prefixes, rules) - .iter() - .any(|suffix| suffix.is_empty()) - } - - /// Return every possible suffix for the messages that match this rule. - /// - /// Apply every permutation of this rule to the provided messages. For each message permutation - /// combination that results in a partial match, emit the remainder of the message that has not - /// yet been matched. Since a rule may reference other rules, including itself, this method is - /// expected to be called recursively. - /// - /// Parameters: - /// - `messages` - The strings to evaluate for a match. It is expected that each of these is a - /// suffix of a single originating message. - /// - `rules` - A dictionary of the other rules for this rule to reference. - /// - /// Returns: All of the possible matching suffixes. If the return value is empty, there were no - /// matches. If one of the entries is the empty string, it means that there was an - /// exact match. If one of the entries is non-empty, it means there was a partial match - /// and the entry represents the remaining portion. - fn matching_suffixes( - &self, - messages: &HashSet<&'a str>, - rules: &HashMap, - ) -> HashSet<&'a str> { - match self { - MatchSingleCharacter(c) => messages - .iter() - .flat_map(|prefix| -> HashSet<&'a str> { - let mut result = HashSet::new(); - if prefix.starts_with(*c) { - result.insert(&prefix[1..prefix.len()]); - } - result - }) - .collect(), - MatchAll(ids) => messages - .iter() - .flat_map(|prefix| -> HashSet<&'a str> { - let mut result = HashSet::new(); - result.insert(*prefix); - for id in ids { - let rule = rules.get(id).unwrap(); - let suffixes = rule.matching_suffixes(&result, rules); - result = suffixes; - if result.is_empty() { - break; - } - } - result - }) - .collect(), - MatchAnySet(id_sets) => messages - .iter() - .flat_map(|prefix| -> HashSet<&'a str> { - id_sets - .iter() - .flat_map(|set| -> HashSet<&'a str> { - let mut result = HashSet::new(); - result.insert(*prefix); - MatchAll(set.to_owned()).matching_suffixes(&result, rules) - }) - .collect() - }) - .collect(), - } - } -} - -impl FromStr for Rule { - type Err = (); - - fn from_str(s: &str) -> Result { - if s.starts_with('"') { - let c = s - .strip_prefix('"') - .and_then(|s| s.strip_suffix('"')) - .and_then(|s| -> Option { - if s.len() != 1 { - return None; - } - s.chars().next() - }) - .unwrap_or_else(|| panic!("Error parsing character: {}", s)); - Ok(MatchSingleCharacter(c)) - } else if s.contains(" | ") { - let potential_rule_sets = s - .split(" | ") - .map(|section| { - section - .trim() - .split(' ') - .map(|c| { - c.parse::() - .unwrap_or_else(|_| panic!("Invalid rule ID: {}", c)) - }) - .collect::>() - }) - .collect(); - Ok(MatchAnySet(potential_rule_sets)) - } else { - let rule_ids = s - .trim() - .split(' ') - .map(|c| c.parse::().unwrap()) - .collect::>(); - Ok(MatchAll(rule_ids)) - } - } -} - -fn parse_rule(string: &str) -> (usize, Rule) { - let mut sections = string.trim().split(": "); - if let Some(id_string) = sections.next() { - let id = id_string - .trim() - .parse::() - .unwrap_or_else(|_| panic!("Unparseable id: {}", id_string)); - if let Some(value_string) = sections.next() { - let value_string = value_string.trim(); - if let Ok(rule) = Rule::from_str(value_string) { - let result = (id, rule); - assert!(sections.next().is_none(), "Too many sections: {}", string); - return result; - } - } - } - - panic!("Malformed rule: {}", string); -} - -/// Get the puzzle input -/// -/// Returns -/// - the rules that valid messages should obey -/// - the received messages -pub fn get_input() -> (HashMap, Vec) { - let mut rules = HashMap::new(); - let mut messages = vec![]; - let mut section = 0; - for line in get_lines("day-19-input.txt") { - if line.is_empty() { - section += 1; - continue; - } - if section == 0 { - let (id, rule) = parse_rule(&line); - rules.insert(id, rule); - } else if section == 1 { - messages.push(line); - } else { - panic!("Unexpected section"); - } - } - (rules, messages) -} - -#[cfg(test)] -mod tests { - use crate::day19::{get_input, Rule}; - - #[test] - fn part1() { - let (rules, messages) = get_input(); - let rule = rules.get(&0usize).unwrap(); - let count = messages - .iter() - .filter(|message| rule.matches(message, &rules)) - .count(); - println!("Part 1: {}", count); - } - - #[test] - fn part2() { - let (mut rules, messages) = get_input(); - rules.insert(8, "42 | 42 8".parse::().unwrap()); - rules.insert(11, "42 31 | 42 11 31".parse::().unwrap()); - let rule = rules.get(&0usize).unwrap(); - let count = messages - .iter() - .filter(|message| rule.matches(message, &rules)) - .count(); - println!("Part 2: {}", count); - } -} diff --git a/src/day20.rs b/src/day20.rs deleted file mode 100644 index 84bb42b..0000000 --- a/src/day20.rs +++ /dev/null @@ -1,680 +0,0 @@ -// --- Day 20: Jurassic Jigsaw --- -// https://adventofcode.com/2020/day/20 - -use std::fmt::{Display, Formatter}; -use std::iter::FromIterator; -use std::ops::{Index, IndexMut}; - -use Transformation::*; - -use crate::get_lines; - -type Id = u64; - -/// A square, monochrome portion of a satellite image. Because the satellite's camera array is -/// malfunctioning, it may have been rotated or flipped randomly. Each tile's image border matches -/// with another tile. -pub struct Tile { - /// A random unique identifier provided by the camera - id: Id, - - /// The square grid of pixels. The length of the outer vector is the same as the length of each - /// inner vector. - pixels: Vec>, -} - -impl Index for Tile { - type Output = Vec; - - fn index(&self, index: usize) -> &Self::Output { - &self.pixels[index] - } -} - -impl IndexMut for Tile { - fn index_mut(&mut self, index: usize) -> &mut Self::Output { - &mut self.pixels[index] - } -} - -impl Clone for Tile { - fn clone(&self) -> Self { - Tile { - id: self.id, - pixels: self.pixels.clone(), - } - } -} - -impl Display for Tile { - fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - let picture = self - .pixels - .iter() - .map(|row| -> String { - let mut joined: String = row.iter().cloned().collect::(); - joined.push('\n'); - joined - }) - .collect::(); - write!(f, "{}:\n{}\n", self.id, picture) - } -} - -impl Tile { - /// Determine all of the possible ways the tile may be flipped and/or rotated - /// - /// Returns: the unique set of ways the tile may be oriented, including the original - fn permutations(&self) -> Vec { - let original = OrientedTile { - tile: self, - transformations: vec![], - }; - let r90 = original.rotate90(); - vec![ - original.flip_horizontally(), - original.flip_vertically(), - original.rotate180(), - original.rotate270(), - r90.flip_horizontally(), - r90.flip_vertically(), - r90, - /* these are redundant: - original.rotate180().flip_horizontally(), original.rotate180().flip_vertically(), - original.rotate270().flip_horizontally(), original.rotate270().flip_vertically(), - */ - original, - ] - } - - /// Determines how rough the waters are in the sea monsters' habitat - /// - /// Returns: the number of '#' pixels in the image - pub fn roughness(&self) -> usize { - let mut result = 0usize; - for row in &self.pixels { - for cell in row { - if cell == &'#' { - result += 1; - } - } - } - result - } - - /// Remove one row of pixels from each edge of the tile - /// - /// Returns: a new tile with the borders removed - pub fn crop_borders(&self) -> Self { - let mut wide_rows = self.pixels.clone(); - wide_rows.remove(wide_rows.len() - 1); - wide_rows.remove(0); - - Tile { - id: self.id, - pixels: wide_rows - .iter() - .cloned() - .map(|mut row| -> Vec { - // let mut row = wide_row.clone(); - row.remove(row.len() - 1); - row.remove(0); - row - }) - .collect(), - } - } -} - -/// A rotation or flip operation on a tile -#[derive(Copy, Clone, Debug)] -enum Transformation { - Rotate90, - Rotate180, - Rotate270, - FlipHorizontally, - FlipVertically, -} - -impl Transformation { - /// Translate the coördinates from an oriented tile to the coördinates on the original tile - /// - /// Parameters: - /// - `x` - the row number in the oriented tile - /// - `y` - the column number in the oriented tile - /// - `length` - the number of pixels on each side of the square tile - /// - /// Returns: `(row, column)` that index into the non-oriented tile - fn transform(&self, x: usize, y: usize, length: usize) -> (usize, usize) { - match self { - Rotate90 => (y, length - x - 1), - Rotate180 => (length - x - 1, length - y - 1), - Rotate270 => (length - y - 1, length - x - 1), - FlipHorizontally => (x, length - y - 1), - FlipVertically => (length - x - 1, y), - } - } -} - -/// A satellite image tile that has been oriented in a specific way. -/// -/// Parameters: -/// `'t` - The lifetime of the non-oriented tile to ensure it outlives the oriented tile -pub struct OrientedTile<'t> { - /// The non-oriented tile - tile: &'t Tile, - - /// ordered list of flip or rotate operations to apply, may be empty - transformations: Vec, -} - -impl<'t> Clone for OrientedTile<'t> { - fn clone(&self) -> Self { - OrientedTile { - tile: self.tile, - transformations: self.transformations.clone(), - } - } -} - -impl<'t> Display for OrientedTile<'t> { - fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - let picture = self - .pixels() - .iter() - .map(|row| -> String { - let mut joined: String = row.iter().cloned().collect::(); - joined.push('\n'); - joined - }) - .collect::(); - write!(f, "{}:\n{}\n", self.tile.id, picture) - } -} - -impl<'t> OrientedTile<'t> { - /// The reference pattern of what a Sea Monster looks like - const SEA_MONSTER: [[char; 20]; 3] = [ - [ - ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', - ' ', '#', ' ', - ], - [ - '#', ' ', ' ', ' ', ' ', '#', '#', ' ', ' ', ' ', ' ', '#', '#', ' ', ' ', ' ', ' ', - '#', '#', '#', - ], - [ - ' ', '#', ' ', ' ', '#', ' ', ' ', '#', ' ', ' ', '#', ' ', ' ', '#', ' ', ' ', '#', - ' ', ' ', ' ', - ], - ]; - - pub fn id(&self) -> Id { - self.tile.id - } - - /// Freeze the orientation of this tile - /// - /// Returns: a new `Tile` that has been reöriented according to the _transformations_. - pub fn tile(&self) -> Tile { - Tile { - id: self.tile.id, - pixels: self.pixels(), - } - } - - /// Calculate the raw pixels of the oriented tile. - /// - /// Returns: a new matrix of pixels, generated by applying the _transformations_. - pub fn pixels(&self) -> Vec> { - (0..self.edge_length()) // final row indices - .map(|i| -> Vec { - (0..self.edge_length()) // final column indices - .map(|j| self.translate(i, j)) // original coördinates - .map(|(x, y)| self.tile[x][y]) // original char - .collect() - }) - .collect() - } - - /// the number of pixels on each edge of the square tile - fn edge_length(&self) -> usize { - self.tile.pixels.len() - } - - /// Convert the coördinates from the oriented tile to the corresponding coördinates in the - /// non-oriented tile. - fn translate(&self, x: usize, y: usize) -> (usize, usize) { - self.transformations - .iter() - .fold((x, y), |previous, transformation| { - transformation.transform(previous.0, previous.1, self.edge_length()) - }) - } - - fn item_at(&self, x: usize, y: usize) -> char { - let coordinates = self.translate(x, y); - self.tile[coordinates.0][coordinates.1] - } - - fn left_border(&'t self) -> impl Iterator + 't { - (0..self.edge_length()).map(move |i| self.item_at(i, 0)) - } - - fn right_border(&'t self) -> impl Iterator + 't { - let last_index = self.edge_length() - 1; - (0..self.edge_length()).map(move |i| self.item_at(i, last_index)) - } - - fn top_border(&'t self) -> impl Iterator + 't { - (0..self.edge_length()).map(move |j| self.item_at(0, j)) - } - - fn bottom_border(&'t self) -> impl Iterator + 't { - let last_index = self.edge_length() - 1; - (0..self.edge_length()).map(move |j| self.item_at(last_index, j)) - } - - fn flip_horizontally(&self) -> Self { - let mut transformations = self.transformations.clone(); - transformations.push(Transformation::FlipHorizontally); - OrientedTile { - tile: self.tile, - transformations, - } - } - - fn flip_vertically(&self) -> Self { - let mut transformations = self.transformations.clone(); - transformations.push(Transformation::FlipVertically); - OrientedTile { - tile: self.tile, - transformations, - } - } - - fn rotate90(&self) -> Self { - let mut transformations = self.transformations.clone(); - transformations.push(Transformation::Rotate90); - OrientedTile { - tile: self.tile, - transformations, - } - } - - fn rotate180(&self) -> Self { - let mut transformations = self.transformations.clone(); - transformations.push(Transformation::Rotate180); - OrientedTile { - tile: self.tile, - transformations, - } - } - - fn rotate270(&self) -> Self { - let mut transformations = self.transformations.clone(); - transformations.push(Transformation::Rotate270); - OrientedTile { - tile: self.tile, - transformations, - } - } - - fn fits_to_left_of(&self, right_candidate: &OrientedTile) -> bool { - OrientedTile::edges_match(right_candidate.left_border(), self.right_border()) - } - - fn fits_above(&self, bottom_candidate: &OrientedTile) -> bool { - OrientedTile::edges_match(bottom_candidate.top_border(), self.bottom_border()) - } - - fn edges_match(mut x: impl Iterator, mut y: impl Iterator) -> bool { - while let (Some(x), Some(y)) = (x.next(), y.next()) { - if x != y { - return false; - } - } - x.next().is_none() && y.next().is_none() - } - - /// Highlights sea monsters with 'O' - /// - /// Returns: the number of sea monsters identified and a copy of the tile with the sea monsters - /// highlighted - pub fn highlight_seamonsters(&'t self) -> (usize, Tile) { - let window_height = OrientedTile::SEA_MONSTER.len(); - let window_width = OrientedTile::SEA_MONSTER[0].len(); - let vertical_windows = self.edge_length() - window_height; - let horizontal_windows = self.edge_length() - window_width; - - let mut pixels = self.pixels(); - - let mut sum = 0usize; - for i in 0..vertical_windows { - for j in 0..horizontal_windows { - if self.contains_sea_monster(&pixels, i, j) { - sum += 1; - self.highlight_seamonster(&mut pixels, i, j); - } - } - } - let tile = Tile { - id: self.tile.id, - pixels, - }; - (sum, tile) - } - - /// Paints a sea monster using '0' in the given window, overwriting any existing pixels - /// - /// Parameters: - /// - `vertical_offset` - how far "down" from the origin that the image starts - /// - `horizontal_offset` - how far "right" from the origin that the image starts - fn highlight_seamonster( - &'t self, - pixels: &mut [Vec], - vertical_offset: usize, - horizontal_offset: usize, - ) { - for i in 0..OrientedTile::SEA_MONSTER.len() { - let pattern_row = OrientedTile::SEA_MONSTER[i]; - for j in 0..pattern_row.len() { - let pattern = pattern_row[j]; - let image_row = &mut pixels[i + vertical_offset]; - if pattern == '#' { - image_row[j + horizontal_offset] = '0'; - } - } - } - } - - /// Determine whether or not the window whose origin is at the specified coördinates contains a - /// sea monster. - /// - /// Parameters: - /// - `vertical_offset` - the vertical origin of the window in question - /// - `horizontal_offset` - the horizontal origin of the window in question - /// - /// Returns: true if and only if the window contains a sea monster - fn contains_sea_monster( - &'t self, - pixels: &[Vec], - vertical_offset: usize, - horizontal_offset: usize, - ) -> bool { - for i in 0..OrientedTile::SEA_MONSTER.len() { - let pattern_row = OrientedTile::SEA_MONSTER[i]; - let image_row = &pixels[i + vertical_offset]; - for j in 0..pattern_row.len() { - let pattern = pattern_row[j]; - // spaces can be anything - if pattern == '#' && image_row[j + horizontal_offset] != '#' { - // only the '#' pixels need to match - return false; - } - } - } - true - } -} - -/// Retrieve all of the image tiles from the Mythical Information Bureau's satellite's camera array. -/// Due to a malfunction in the array, the tiles arrive in a random order and rotated or flipped -/// randomly. -pub fn get_input() -> Vec { - let mut result = vec![]; - let mut id: Id = 0; - let mut rows = vec![]; - for line in get_lines("day-20-input.txt") { - if line.starts_with("Tile") { - let mut components = line.split(' '); - components.next(); // "Tile" - id = components - .next() - .and_then(|string| string.strip_suffix(':')) - .map(|string| string.parse::().unwrap()) - .expect("Invalid tile ID"); - rows = vec![]; - } else if line.is_empty() { - result.push(Tile { - id, - pixels: rows.to_owned(), - }); - } else { - rows.push(line.chars().collect::>()); - } - } - result -} - -#[derive(Clone)] -pub struct TileArrangement<'t> { - arrangement: Vec>, - - /// The number of _tiles_ on each edge of the arrangement - edge_length: usize, -} - -impl<'t> FromIterator<&'t Tile> for TileArrangement<'t> { - fn from_iter>(iter: T) -> Self { - let tiles = iter.into_iter().collect::>(); - let edge_length = (tiles.len() as f32).sqrt() as usize; - TileArrangement { - arrangement: tiles - .iter() - .map(|tile| OrientedTile { - tile, - transformations: vec![], - }) - .collect(), - edge_length, - } - } -} - -impl<'t> TileArrangement<'t> { - pub fn top_left_corner(&self) -> Option<&OrientedTile<'t>> { - self.arrangement.get(0) - } - - pub fn top_right_corner(&self) -> Option<&OrientedTile<'t>> { - self.arrangement.get(self.edge_length - 1) - } - - pub fn bottom_left_corner(&self) -> Option<&OrientedTile<'t>> { - self.arrangement - .get(self.arrangement.len() - self.edge_length) - } - - pub fn bottom_right_corner(&self) -> Option<&OrientedTile<'t>> { - self.arrangement.last() - } - - fn tile_above(&self, index: usize) -> Option<&OrientedTile<'t>> { - if index < self.edge_length { - None - } else { - self.arrangement.get(index - self.edge_length) - } - } - - fn tile_to_left(&self, index: usize) -> Option<&OrientedTile<'t>> { - if index % self.edge_length == 0 { - None - } else { - self.arrangement.get(index - 1) - } - } - - fn fits(&self, candidate: &'t Tile) -> Option> { - let new_index = self.arrangement.len(); - let tile_above = self.tile_above(new_index); - let tile_to_left = self.tile_to_left(new_index); - for orientation in candidate.permutations() { - let top_fits = - tile_above.is_none() || tile_above.as_ref().unwrap().fits_above(&orientation); - let left_fits = tile_to_left.is_none() - || tile_to_left.as_ref().unwrap().fits_to_left_of(&orientation); - if top_fits && left_fits { - return Some(orientation); - } - } - None - } - - /// Combine a specific arrangement of tiles into one big tile - pub fn combine(&self) -> Tile { - assert_eq!( - self.arrangement.len(), - self.edge_length * self.edge_length, - "arrangement is incomplete" - ); - let mut grid: Vec> = Vec::with_capacity(self.edge_length); - for (index, tile) in self.arrangement.iter().enumerate() { - let tile_row = index / self.edge_length; - let tile_column = index % self.edge_length; - let pixels = tile.pixels(); - let row_offset = pixels.len() * tile_row; - let column_offset = pixels.len() * tile_column; - for (original_row, row) in pixels.iter().enumerate() { - let row_id = original_row + row_offset; - for (original_column, pixel) in row.iter().enumerate() { - let column_id = original_column + column_offset; - if column_id == 0 { - grid.push(Vec::with_capacity(self.edge_length)); - } - let row = &mut grid[row_id]; - row.push(*pixel); - } - } - } - Tile { - id: 0, - pixels: grid, - } - } -} - -/// Find valid permutations of tile orientations that yield an image. -/// -/// Parameters: -/// - `partial_arrangement` - A valid arrangement prefix -/// - `remaining_tiles` - All of the tiles not in `partial_arrangement` -/// - `edge_length` - the number of _tiles_ on each edge of the final arrangement -/// Returns: some permutations of some arrangements of tiles whose borders match -pub fn get_valid_arrangements<'t>( - partial_arrangement: TileArrangement<'t>, - remaining_tiles: Vec<&'t Tile>, - edge_length: usize, -) -> Vec> { - if remaining_tiles.is_empty() { - return vec![partial_arrangement]; - } else if partial_arrangement.arrangement.is_empty() { - // Find candidates for the top-left tile - for i in 0..remaining_tiles.len() { - let candidate = remaining_tiles[i]; // choose a candidate for the top left corner - for orientation in candidate.permutations() { - // choose an orientation for the candidate tile - let partial = TileArrangement { - arrangement: vec![orientation], - edge_length, - }; - let (left, _) = remaining_tiles.split_at(i); - let (_, right) = remaining_tiles.split_at(i + 1); - let mut remaining = vec![]; - remaining.extend_from_slice(left); - remaining.extend_from_slice(right); - - // get all the possible arrangements with this orientation as the first tile - let valid_arrangements = get_valid_arrangements(partial, remaining, edge_length); - if !valid_arrangements.is_empty() { - // There are more valid arrangements, but we only need one - return valid_arrangements; - } - } - } - return vec![]; - } - - // Find all possible suffixes given the partial, valid, arrangement - let mut prefixes = vec![]; - for i in 0..remaining_tiles.len() { - // choose a candidate for the next tile - let candidate = remaining_tiles[i]; - // check if it fits in some orientation - if let Some(candidate) = partial_arrangement.fits(candidate) { - let mut partial = partial_arrangement.clone(); - partial.arrangement.push(candidate); - - let (left, _) = remaining_tiles.split_at(i); - let (_, right) = remaining_tiles.split_at(i + 1); - let mut remaining = vec![]; - remaining.extend_from_slice(left); - remaining.extend_from_slice(right); - - let valid_arrangements = get_valid_arrangements(partial, remaining, edge_length); - prefixes.extend(valid_arrangements.iter().cloned()); - } - } - prefixes -} - -#[cfg(test)] -mod tests { - use crate::day20::{get_input, get_valid_arrangements, Tile, TileArrangement}; - - #[test] - fn part1() { - let tiles = get_input(); - let refs = tiles.iter().collect(); - let edge_length = (tiles.len() as f32).sqrt() as usize; - let empty = TileArrangement { - arrangement: vec![], - edge_length, - }; - let possible_arrangements = get_valid_arrangements(empty, refs, edge_length); - assert!(!possible_arrangements.is_empty()); - let arrangement = possible_arrangements.get(0).unwrap(); - let result: u64 = vec![ - arrangement.top_left_corner().unwrap(), - arrangement.top_right_corner().unwrap(), - arrangement.bottom_left_corner().unwrap(), - arrangement.bottom_right_corner().unwrap(), - ] - .iter() - .map(|corner| corner.id()) - .product(); - println!("Part 1: {}", result); - } - - #[test] - fn part2() { - let tiles = get_input(); - let refs = tiles.iter().collect(); - let edge_length = (tiles.len() as f32).sqrt() as usize; - let empty = TileArrangement { - arrangement: vec![], - edge_length, - }; - let possible_arrangements = get_valid_arrangements(empty, refs, edge_length); - assert!(!possible_arrangements.is_empty()); - let arrangement = &possible_arrangements[0]; - - let cropped = arrangement - .arrangement - .iter() - .map(|oriented| oriented.tile()) - .map(|tile| tile.crop_borders()) - .collect::>(); - let cropped = cropped.iter().collect::(); - let combined = cropped.combine(); - for permutation in combined.permutations() { - let (num_sea_monsters, highlighted) = permutation.highlight_seamonsters(); - if num_sea_monsters > 0 { - println!("Part 2: {}", highlighted.roughness()); - return; - } - } - unreachable!("None of the permutations had sea monsters") - } -} diff --git a/src/day21.rs b/src/day21.rs deleted file mode 100644 index d5e69be..0000000 --- a/src/day21.rs +++ /dev/null @@ -1,194 +0,0 @@ -// --- Day 21: Allergen Assessment --- -// https://adventofcode.com/2020/day/21 - -use crate::get_lines; -use std::collections::{BTreeSet, HashMap, HashSet}; - -/// A substance used in a food. It may contain 0 or 1 _Allergen_. -pub type Ingredient = String; - -/// A substance that may be harmful to some individuals. It is found in exactly one _Ingredient_. -pub type Allergen = String; - -/// A food item you are considering taking on your journey -#[derive(Eq, PartialEq, Hash)] -pub struct Food { - /// A comprehensive list of the ingredients used in this food, listed in a language you do not - /// understand. - ingredient_ids: Vec, - - /// Some or all of the allergens contained in this food, listed in a language you understand. - /// Some allergens may be omitted. - allergen_ids: Vec, -} - -/// Read the puzzle input -/// -/// Returns: -/// - the unique set of ingredients that can appear in any food -/// - all of the potential food items -pub fn get_input() -> (Vec, Vec, HashSet) { - let mut all_ingredients = BTreeSet::new(); - let mut all_allergens = BTreeSet::new(); - let mut foods = HashSet::new(); - - for line in get_lines("day-21-input.txt") { - let mut split = line.split(" (contains "); - let ingredient_list = split.next().expect("Missing ingredients"); - let allergen_list = split.next().expect("Missing allergens"); - if split.next().is_some() { - panic!("More components found"); - } - let mut ingredients = Vec::new(); - for ingredient in ingredient_list.split(' ').map(String::from) { - ingredients.push(ingredient.clone()); - all_ingredients.insert(ingredient); - } - let mut allergens = Vec::new(); - for allergen in allergen_list.replace(')', "").split(", ").map(String::from) { - allergens.push(allergen.clone()); - all_allergens.insert(allergen.clone()); - } - let food = (ingredients, allergens); - foods.insert(food); - } - let mut ingredient_map = HashMap::new(); - let mut allergen_map = HashMap::new(); - let mut ingredients = Vec::with_capacity(all_ingredients.len()); - let mut allergens = Vec::with_capacity(all_allergens.len()); - for (index, ingredient) in all_ingredients.iter().enumerate() { - ingredients.push(ingredient.clone()); // a "drain" operation would be ideal - ingredient_map.insert(ingredient, index); - } - for (index, allergen) in all_allergens.iter().enumerate() { - allergens.push(allergen.clone()); // a "drain" operation would be ideal - allergen_map.insert(allergen, index); - } - let foods = foods - .iter() - .map(|(ingredients, allergens)| -> Food { - Food { - ingredient_ids: ingredients - .iter() - .map(|ingredient| ingredient_map[ingredient]) - .collect(), - allergen_ids: allergens - .iter() - .map(|allergen| allergen_map[allergen]) - .collect(), - } - }) - .collect(); - - (ingredients, allergens, foods) -} - -#[cfg(test)] -mod tests { - use crate::day21::{get_input, Food, Ingredient}; - use std::collections::{BTreeMap, HashMap, HashSet}; - - #[test] - fn part1() { - let (ingredients, allergens, foods) = get_input(); - let mut allergen_to_food = (0..allergens.len()) - .map(|_| HashSet::new()) - .collect::>>(); - for food in &foods { - for allergen_id in &food.allergen_ids { - allergen_to_food[*allergen_id].insert(food); - } - } - // "determine which ingredients can't possibly contain any of the allergens in any food in your list" - let mut inert_ingredient_ids = (0..ingredients.len()).collect::>(); - - for foods_that_contain_allergen in allergen_to_food { - let mut ingredients_that_may_contain_allergen = - (0..ingredients.len()).collect::>(); - - for food in foods_that_contain_allergen { - ingredients_that_may_contain_allergen - .retain(|ingredient_id| food.ingredient_ids.contains(ingredient_id)); - } - inert_ingredient_ids.retain(|ingredient_id| { - !ingredients_that_may_contain_allergen.contains(ingredient_id) - }); - } - - // "How many times do any of those ingredients appear?" - let mut sum = 0usize; - for food in foods { - for ingredient_id in &inert_ingredient_ids { - if food.ingredient_ids.contains(ingredient_id) { - sum += 1; - } - } - } - println!("Part 1: {}", sum); - } - - #[test] - fn part2() { - let (ingredients, allergens, foods) = get_input(); - let mut allergen_to_food = (0..allergens.len()) - .map(|_| HashSet::new()) - .collect::>>(); - for food in &foods { - for allergen_id in &food.allergen_ids { - allergen_to_food[*allergen_id].insert(food); - } - } - // "determine which ingredients can't possibly contain any of the allergens in any food in your list" - let mut dangerous_ingredients = HashSet::new(); - let mut allergen_to_ingredient = (0..allergens.len()) - .map(|_| HashSet::new()) - .collect::>>(); - for (allergen_id, foods) in allergen_to_food.iter().enumerate() { - let mut ingredients_that_may_contain_allergen = - (0..ingredients.len()).collect::>(); - for food in foods { - ingredients_that_may_contain_allergen - .retain(|ingredient_id| food.ingredient_ids.contains(ingredient_id)); - } - for dangerous_ingredient in ingredients_that_may_contain_allergen.clone() { - dangerous_ingredients.insert(dangerous_ingredient); - } - allergen_to_ingredient[allergen_id] = ingredients_that_may_contain_allergen; - } - - let mut ingredient_to_allergen = HashMap::new(); - while !dangerous_ingredients.is_empty() { - let mut mapped_ingredients = HashSet::new(); - for dangerous_ingredient in dangerous_ingredients.clone() { - let mut mapped_allergen = None; - for (allergen_id, ingredients) in allergen_to_ingredient.iter().enumerate() { - if ingredients.len() == 1 && ingredients.contains(&dangerous_ingredient) { - // this is the only ingredient known to contain this allergen - ingredient_to_allergen.insert(dangerous_ingredient, allergen_id); - mapped_allergen = Some(allergen_id); - break; - } - } - if let Some(allergen_to_remove) = mapped_allergen { - allergen_to_ingredient[allergen_to_remove] = HashSet::with_capacity(0); - allergen_to_ingredient.iter_mut().for_each(|ingredients| { - ingredients.remove(&dangerous_ingredient); - }); - mapped_ingredients.insert(dangerous_ingredient); - } - } - for item in mapped_ingredients { - dangerous_ingredients.remove(&item); - } - } - let result = ingredient_to_allergen - .iter() - .map(|(ingredient_id, allergen_id)| (*allergen_id, &ingredients[*ingredient_id])) - .collect::>() - .iter() - .map(|(_, ingredient)| String::from(*ingredient)) - .collect::>() - .join(","); - println!("Part 2: {}", result); - } -} diff --git a/src/day22.rs b/src/day22.rs deleted file mode 100644 index aa9da7d..0000000 --- a/src/day22.rs +++ /dev/null @@ -1,192 +0,0 @@ -// --- Day 22: Crab Combat --- -// https://adventofcode.com/2020/day/22 - -use std::collections::HashSet; - -use crate::get_lines; - -/// A space card -type Card = u8; - -/// A small deck of space cards -#[derive(Clone, Eq, PartialEq, Hash)] -pub struct Deck { - cards: Vec, // TODO try linked list -} - -impl Deck { - /// Remove the first card so it can be played in a Round - pub fn draw_top(&mut self) -> Card { - let result = self.cards[0]; - self.cards.remove(0); - result - } - - /// Call if the controlling player won a round - /// Parameters: - /// - `winning_card` - the first card to insert (will become the penultimate card in the deck) - /// - `losing_card` - the second card to insert (will become the bottom card in the deck) - pub fn insert(&mut self, winning_card: Card, losing_card: Card) { - self.cards.push(winning_card); - self.cards.push(losing_card); - } - - /// Calculate the current score of the deck - pub fn score(&self) -> usize { - let mut multiplier = self.cards.len(); - let mut score = 0usize; - for card in &self.cards { - score += multiplier * (*card as usize); - multiplier -= 1; - } - score - } - - pub fn is_empty(&self) -> bool { - self.cards.is_empty() - } - - /// Create a new deck based on the first _count_ space cards - pub fn clone_first(&self, count: usize) -> Deck { - let (first, _) = self.cards.split_at(count); - Deck { - cards: first.to_vec(), - } - } -} - -/// One of two players in a game of _Combat_ -#[derive(Eq)] -pub struct Player { - id: u8, - deck: Deck, -} - -impl Player { - pub fn draw_top(&mut self) -> Card { - self.deck.draw_top() - } - - pub fn insert(&mut self, winning_card: Card, losing_card: Card) { - self.deck.insert(winning_card, losing_card) - } - - pub fn has_cards(&self) -> bool { - !self.deck.is_empty() - } - - pub fn has_at_least(&self, card_count: u8) -> bool { - self.deck.cards.len() >= card_count as usize - } - - pub fn clone_first(&self, count: usize) -> Player { - Player { - id: self.id, - deck: self.deck.clone_first(count), - } - } - - pub fn score(&self) -> usize { - self.deck.score() - } -} - -impl PartialEq for Player { - fn eq(&self, other: &Self) -> bool { - self.id == other.id - } -} - -pub fn get_input() -> (Player, Player) { - let mut player_1 = Deck { cards: vec![] }; - let mut player_2 = Deck { cards: vec![] }; - let mut target = &mut player_1; - for line in get_lines("day-22-input.txt") { - if line.eq("Player 1:") { - target = &mut player_1; - } else if line.eq("Player 2:") { - target = &mut player_2; - } else if line.is_empty() { - continue; - } else { - target.cards.push(line.parse::().unwrap()) - } - } - ( - Player { - id: 1, - deck: player_1, - }, - Player { - id: 2, - deck: player_2, - }, - ) -} - -/// Play a game of _Recursive Combat_ -pub fn play(mut player1: Player, mut player2: Player) -> Player { - let mut previous_rounds: HashSet<(Deck, Deck)> = HashSet::new(); - while player1.has_cards() && player2.has_cards() { - if !previous_rounds.insert((player1.deck.clone(), player2.deck.clone())) { - return player1; - } - let x = player1.draw_top(); - let y = player2.draw_top(); - if player1.has_at_least(x) && player2.has_at_least(y) { - let winner = play( - player1.clone_first(x as usize), - player2.clone_first(y as usize), - ); - if winner == player1 { - player1.insert(x, y); - } else { - player2.insert(y, x); - } - } else if x > y { - player1.insert(x, y); - } else { - player2.insert(y, x); - } - } - - if player1.has_cards() { - player1 - } else { - player2 - } -} - -#[cfg(test)] -mod tests { - use crate::day22::{get_input, play}; - - #[test] - fn part1() { - let (mut player_1, mut player_2) = get_input(); - while player_1.has_cards() && player_2.has_cards() { - let x = player_1.draw_top(); - let y = player_2.draw_top(); - assert_ne!(x, y); - if x > y { - player_1.insert(x, y); - } else { - player_2.insert(y, x); - } - } - let winner = if player_1.has_cards() { - player_1 - } else { - player_2 - }; - let score = winner.score(); - println!("Part 1: {}", score); - } - - #[test] - fn part2() { - let (player_1, player_2) = get_input(); - let winner = play(player_1, player_2); - println!("Part 2: {}", winner.score()); - } -} diff --git a/src/day23.rs b/src/day23.rs deleted file mode 100644 index 4cc7ed6..0000000 --- a/src/day23.rs +++ /dev/null @@ -1,111 +0,0 @@ -// --- Day 23: Crab Cups --- -// https://adventofcode.com/2020/day/22 - -use crate::get_lines; - -type Cup = u8; - -pub struct Game { - circle: Vec, - lowest_label: Cup, - highest_label: Cup, - current_index: usize, -} - -impl Game { - fn take(&mut self) -> Cup { - let mut index = self.current_index + 1; - if index >= self.circle.len() { - index = 0; - } - let result = self.circle.remove(index); - if self.current_index >= self.circle.len() { - self.current_index = self.circle.len() - 1; - } - result - } - - fn get_index(&self, label: Cup) -> usize { - for (index, cup) in self.circle.iter().enumerate() { - if *cup == label { - return index; - } - } - panic!("Cannot find label: {}", label) - } - - pub fn perform_move(&mut self) { - let first = self.take(); - let second = self.take(); - let third = self.take(); - let current_cup = self.circle[self.current_index]; - let mut destination_label = current_cup - 1; - if destination_label < self.lowest_label { - destination_label = self.highest_label; - } - while destination_label == first - || destination_label == second - || destination_label == third - { - destination_label -= 1; - if destination_label < self.lowest_label { - destination_label = self.highest_label; - } - } - let mut destination = self.get_index(destination_label) + 1; - if destination >= self.circle.len() { - destination = 0; - } - self.circle.insert(destination, third); - self.circle.insert(destination, second); - self.circle.insert(destination, first); - let mut index = self.get_index(current_cup) + 1; - if index >= self.circle.len() { - index = 0; - } - self.current_index = index; - } - - pub fn get_cup_order(&self) -> Vec { - let start = self.get_index(1); - (1..self.circle.len()) - .map(|i| (i + start) % self.circle.len()) - .map(|index| self.circle[index]) - .collect() - } -} - -pub fn get_input() -> Vec { - let mut lines = get_lines("day-23-input.txt"); - let line = lines.next().unwrap(); - line.chars() - .map(|c| c.to_digit(10).unwrap() as Cup) - .collect() -} - -#[cfg(test)] -mod tests { - use crate::day23::{get_input, Game}; - - #[test] - fn part1() { - let cups = get_input(); - let mut min = u8::MAX; - let mut max = u8::MIN; - for cup in &cups { - min = min.min(*cup); - max = max.max(*cup); - } - let mut game = Game { - circle: cups, - lowest_label: min, - highest_label: max, - current_index: 0, - }; - for _ in 1..=100 { - game.perform_move(); - } - let order = game.get_cup_order(); - println!("Part 1: {:?}", order); - } -} diff --git a/src/lib.rs b/src/lib.rs index a935922..708ec3e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,29 +1,4 @@ -#[macro_use] -extern crate lazy_static; - pub mod day01; -pub mod day02; -pub mod day03; -pub mod day04; -pub mod day05; -pub mod day06; -pub mod day07; -pub mod day08; -pub mod day09; -pub mod day10; -pub mod day11; -pub mod day12; -pub mod day13; -pub mod day14; -pub mod day15; -pub mod day16; -pub mod day17; -pub mod day18; -pub mod day19; -pub mod day20; -pub mod day21; -pub mod day22; -pub mod day23; use crate::BufReadResult::{BufferingError, EndOfBlock, EndOfInput, PartialBlock}; use serde_derive::Deserialize; From 1a87f4bffe13f6846b6301e6404e005b6ff34bcc Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Wed, 30 Nov 2022 21:47:19 -0800 Subject: [PATCH 015/142] Day 1 --- sample/day-01.txt | 14 ++++++++++++++ src/day01.rs | 48 +++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 54 insertions(+), 8 deletions(-) create mode 100644 sample/day-01.txt diff --git a/sample/day-01.txt b/sample/day-01.txt new file mode 100644 index 0000000..444e241 --- /dev/null +++ b/sample/day-01.txt @@ -0,0 +1,14 @@ +1000 +2000 +3000 + +4000 + +5000 +6000 + +7000 +8000 +9000 + +10000 \ No newline at end of file diff --git a/src/day01.rs b/src/day01.rs index aa58887..41a7108 100644 --- a/src/day01.rs +++ b/src/day01.rs @@ -1,23 +1,55 @@ use crate::get_lines; -pub fn get_input() -> Vec { - get_lines("day-1-input.txt").collect() +pub fn get_elves() -> Vec { + let mut items = vec![]; + let mut result = vec![]; + for line in get_lines("day-01.txt") { + if line.is_empty() { + result.push(Elf { + item_calories: items, + }); + items = vec![]; + } else { + items.push(line.parse::().unwrap()); + } + } + if !items.is_empty() { + result.push(Elf { + item_calories: items, + }); + } + result +} + +pub struct Elf { + item_calories: Vec, +} + +impl Elf { + pub fn calories_carried(&self) -> usize { + self.item_calories.iter().sum() + } } #[cfg(test)] mod tests { + use crate::day01::{get_elves, Elf}; - // #[test] + #[test] fn part1() { - let _items = super::get_input(); + let mut elves = get_elves(); + elves.sort_unstable_by(|x, y| y.calories_carried().cmp(&x.calories_carried())); - todo!() + println!("Part 1: {}", elves[0].calories_carried()); } - // #[test] + #[test] fn part2() { - let _items = super::get_input(); + let mut elves = get_elves(); + elves.sort_unstable_by(|x, y| y.calories_carried().cmp(&x.calories_carried())); - todo!() + let (elves, _) = elves.split_at(3); + let result: usize = elves.iter().map(Elf::calories_carried).sum(); + println!("Part 2: {}", result); } } From 445cfba9d6e10de9199e76253c3c0c2711cb6a79 Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Wed, 30 Nov 2022 22:24:29 -0800 Subject: [PATCH 016/142] Day 1 - performance optimisation --- src/day01.rs | 72 +++++++++++++++++++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 23 deletions(-) diff --git a/src/day01.rs b/src/day01.rs index 41a7108..78a5595 100644 --- a/src/day01.rs +++ b/src/day01.rs @@ -1,55 +1,81 @@ use crate::get_lines; +use std::cmp::Ordering; -pub fn get_elves() -> Vec { - let mut items = vec![]; +pub fn get_elves(max: usize) -> Vec { + let mut calories_carried = 0usize; let mut result = vec![]; for line in get_lines("day-01.txt") { if line.is_empty() { - result.push(Elf { - item_calories: items, - }); - items = vec![]; + let elf = Elf { calories_carried }; + calories_carried = 0; + + let index = match result.binary_search(&elf) { + Ok(index) => index, + Err(index) => index, + }; + result.insert(index, elf); + if result.len() > max { + result.remove(result.len() - 1); + } } else { - items.push(line.parse::().unwrap()); + calories_carried += line.parse::().unwrap(); } } - if !items.is_empty() { - result.push(Elf { - item_calories: items, - }); + if calories_carried > 0 { + let elf = Elf { calories_carried }; + let index = match result.binary_search(&elf) { + Ok(index) => index, + Err(index) => index, + }; + result.insert(index, elf); + if result.len() > max { + result.remove(result.len() - 1); + } } result } +#[derive(Debug)] pub struct Elf { - item_calories: Vec, + calories_carried: usize, +} + +impl Eq for Elf {} + +impl PartialEq for Elf { + fn eq(&self, other: &Self) -> bool { + self.calories_carried == other.calories_carried + } +} + +impl PartialOrd for Elf { + fn partial_cmp(&self, other: &Self) -> Option { + other.calories_carried.partial_cmp(&self.calories_carried) + } } -impl Elf { - pub fn calories_carried(&self) -> usize { - self.item_calories.iter().sum() +impl Ord for Elf { + fn cmp(&self, other: &Self) -> Ordering { + other.calories_carried.cmp(&self.calories_carried) } } #[cfg(test)] mod tests { - use crate::day01::{get_elves, Elf}; + use crate::day01::get_elves; #[test] fn part1() { - let mut elves = get_elves(); - elves.sort_unstable_by(|x, y| y.calories_carried().cmp(&x.calories_carried())); + let elves = get_elves(1); - println!("Part 1: {}", elves[0].calories_carried()); + println!("Part 1: {}", elves[0].calories_carried); } #[test] fn part2() { - let mut elves = get_elves(); - elves.sort_unstable_by(|x, y| y.calories_carried().cmp(&x.calories_carried())); + let elves = get_elves(3); + let result: usize = elves.iter().map(|elf| elf.calories_carried).sum(); - let (elves, _) = elves.split_at(3); - let result: usize = elves.iter().map(Elf::calories_carried).sum(); println!("Part 2: {}", result); } } From 3074a36b6f389038f21e4fd9f7b6536215077f70 Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Thu, 1 Dec 2022 22:19:43 -0800 Subject: [PATCH 017/142] Day 2 --- sample/day-02.txt | 3 + src/day02.rs | 161 ++++++++++++++++++++++++++++++++++++++++++++++ src/lib.rs | 1 + 3 files changed, 165 insertions(+) create mode 100644 sample/day-02.txt create mode 100644 src/day02.rs diff --git a/sample/day-02.txt b/sample/day-02.txt new file mode 100644 index 0000000..25097e8 --- /dev/null +++ b/sample/day-02.txt @@ -0,0 +1,3 @@ +A Y +B X +C Z \ No newline at end of file diff --git a/src/day02.rs b/src/day02.rs new file mode 100644 index 0000000..6a1173c --- /dev/null +++ b/src/day02.rs @@ -0,0 +1,161 @@ +/// --- Day 2: Rock Paper Scissors --- +/// https://adventofcode.com/2022/day/2 +use std::str::FromStr; + +use crate::day02::ResponseStrategy::{Draw, Lose, Win}; +use crate::day02::Shape::{Paper, Rock, Scissors}; + +use crate::get_lines; + +#[derive(PartialEq, Eq, Copy, Clone)] +pub enum Shape { + Rock, + Paper, + Scissors, +} + +impl Shape { + pub fn beats(&self) -> Self { + match self { + Rock => Scissors, + Paper => Rock, + Scissors => Paper, + } + } + + pub fn beaten_by(&self) -> Self { + match self { + Rock => Paper, + Paper => Scissors, + Scissors => Rock, + } + } + + pub fn value(&self) -> u16 { + match self { + Rock => 1, + Paper => 2, + Scissors => 3, + } + } +} + +impl FromStr for Shape { + type Err = (); + + fn from_str(s: &str) -> Result { + match s { + "A" | "X" => Ok(Rock), + "B" | "Y" => Ok(Paper), + "C" | "Z" => Ok(Scissors), + _ => Err(()), + } + } +} + +pub enum ResponseStrategy { + Lose, + Draw, + Win, +} + +impl ResponseStrategy { + pub fn respond_to(&self, opponent: &Shape) -> Shape { + match self { + Lose => opponent.beats(), + Draw => *opponent, + Win => opponent.beaten_by(), + } + } +} + +impl FromStr for ResponseStrategy { + type Err = (); + + fn from_str(s: &str) -> Result { + match s { + "X" => Ok(Lose), + "Y" => Ok(Draw), + "Z" => Ok(Win), + _ => Err(()), + } + } +} + +pub struct Round { + opponent_shape: Shape, + potential_response: Shape, + response_strategy: ResponseStrategy, +} + +impl Round { + pub fn naïve_score(&self) -> u16 { + outcome(&self.opponent_shape, &self.potential_response) + self.potential_response.value() + } + + pub fn score(&self) -> u16 { + let response = self.response_strategy.respond_to(&self.opponent_shape); + outcome(&self.opponent_shape, &response) + response.value() + } +} + +impl FromStr for Round { + type Err = &'static str; + + fn from_str(line: &str) -> Result { + let mut components = line.split_whitespace(); + let opponent_shape = components + .next() + .ok_or("Opponent's shape code not found")? + .parse::() + .ok() + .ok_or("Could not decipher opponent's shape")?; + let strategy_code = components.next().ok_or("Strategy code not found")?; + let potential_response = strategy_code + .parse::() + .ok() + .ok_or("Could not decipher potential response")?; + let response_strategy = strategy_code + .parse::() + .ok() + .ok_or("Could not decipher response strategy")?; + Ok(Round { + opponent_shape, + potential_response, + response_strategy, + }) + } +} + +fn outcome(opponent: &Shape, player: &Shape) -> u16 { + if opponent == player { + 3 + } else if opponent.beaten_by() == *player { + 6 + } else { + 0 + } +} + +pub fn get_input() -> impl Iterator { + get_lines("day-02.txt").map(|line| line.parse::().expect("Unable to parse round")) +} + +#[cfg(test)] +mod tests { + use crate::day02::get_input; + + #[test] + fn part1() { + let result: u16 = get_input().map(|round| round.naïve_score()).sum(); + + println!("Part 1: {}", result); + } + + #[test] + fn part2() { + let result: u16 = get_input().map(|round| round.score()).sum(); + + println!("Part 2: {}", result); + } +} diff --git a/src/lib.rs b/src/lib.rs index 708ec3e..24dfd6a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,5 @@ pub mod day01; +pub mod day02; use crate::BufReadResult::{BufferingError, EndOfBlock, EndOfInput, PartialBlock}; use serde_derive::Deserialize; From 9cf4e424dcfc5e7dab2e7c8337084d02aefb31bd Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Thu, 1 Dec 2022 22:36:52 -0800 Subject: [PATCH 018/142] Link to other editions --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0cfa812..a8d007d 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,6 @@ ## Other Editions -* 2020 Advent of Code ([Java](https://github.com/l0s/advent-of-code-java/tree/2020)|[Rust](https://github.com/l0s/advent-of-code-rust/releases/tag/y2020)) +* 2020 Advent of Code ( [Java](https://github.com/l0s/advent-of-code-java/tree/2020) | [Rust](https://github.com/l0s/advent-of-code-rust/releases/tag/y2020) ) +* 2021 Advent of Code ( [Java](https://github.com/l0s/advent-of-code-java/releases/tag/2021) ) +* 2022 Advent of Code ( [Java](https://github.com/l0s/advent-of-code-java) ) From 1079df5169c2161a268468b8de5bc84ae46083ab Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Fri, 2 Dec 2022 22:33:55 -0800 Subject: [PATCH 019/142] Day 3 --- sample/day-03.txt | 6 +++ src/day03.rs | 131 ++++++++++++++++++++++++++++++++++++++++++++++ src/lib.rs | 1 + 3 files changed, 138 insertions(+) create mode 100644 sample/day-03.txt create mode 100644 src/day03.rs diff --git a/sample/day-03.txt b/sample/day-03.txt new file mode 100644 index 0000000..9919ffa --- /dev/null +++ b/sample/day-03.txt @@ -0,0 +1,6 @@ +vJrwpWtwJgWrhcsFMMfFFhFp +jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL +PmmdzqPrVvPwwTWBwg +wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn +ttgJtRGJQctTZtZT +CrZsJsPPZsGzwwsLwLmpwMDw \ No newline at end of file diff --git a/src/day03.rs b/src/day03.rs new file mode 100644 index 0000000..d00a366 --- /dev/null +++ b/src/day03.rs @@ -0,0 +1,131 @@ +use std::collections::HashSet; +/// --- Day 3: Rucksack Reorganization --- +/// https://adventofcode.com/2022/day/3 +use std::str::FromStr; + +use crate::get_lines; + +/// A container with supplies for a jungle journey. "Each rucksack has two large compartments. All +/// items of a given type are meant to go into exactly one of the two compartments." +pub struct Rucksack { + items: HashSet, + compartments: (HashSet, HashSet), +} + +impl Rucksack { + pub fn priority(&self) -> Result { + let mut intersection = self.compartments.0.intersection(&self.compartments.1); + if let Some(common_item) = intersection.next() { + if intersection.next().is_some() { + return Err("Multiple common items between the compartments"); + } + return Ok(priority(*common_item)); + } + Err("No common items between the compartments") + } +} + +/// A value to assist in item reärrangement +fn priority(item: char) -> u32 { + let item = item as u32; + if item >= 'a' as u32 && item <= 'z' as u32 { + item - 'a' as u32 + 1 + } else { + item - 'A' as u32 + 27 + } +} + +impl FromStr for Rucksack { + type Err = &'static str; + + fn from_str(s: &str) -> Result { + let items = s.chars().collect::>(); + if items.len() % 2 != 0 { + return Err("The items cannot be evenly divided between the two compartments"); + } + let compartments = items.split_at(items.len() / 2); + let compartments = ( + compartments.0.iter().copied().collect::>(), + compartments.1.iter().copied().collect::>(), + ); + let items = items.iter().copied().collect::>(); + Ok(Self { + items, + compartments, + }) + } +} + +/// A group of elves' rucksacks. There is exactly one common item shared by each group member. +pub struct Group { + members: (Rucksack, Rucksack, Rucksack), +} + +impl Group { + /// The priority of shared item + pub fn badge_priority(&self) -> Result { + let badge = self.badge()?; + Ok(priority(badge)) + } + fn badge(&self) -> Result { + let intersection = self + .members + .0 + .items + .intersection(&self.members.1.items) + .copied() + .collect::>(); + let mut intersection = intersection.intersection(&self.members.2.items); + if let Some(badge) = intersection.next() { + if intersection.next().is_some() { + return Err("Multiple items in common between members of the group"); + } + return Ok(*badge); + } + Err("No items in common between members of the group") + } +} + +pub fn get_input() -> impl Iterator { + get_lines("day-03.txt") + .map(|line| line.parse::()) + .map(Result::unwrap) +} + +#[cfg(test)] +mod tests { + + use crate::day03::{get_input, Group}; + + #[test] + fn part1() { + let result: u32 = get_input() + .map(|rucksack| rucksack.priority().unwrap()) + .sum(); + + println!("Part 1: {}", result); + } + + #[test] + fn part2() { + let mut groups = vec![]; + let mut iter = get_input(); + loop { + if let Some(first) = iter.next() { + let second = iter.next().expect("Group only has one item"); + let third = iter.next().expect("Group only has two items"); + let members = (first, second, third); + groups.push(Group { members }); + } else { + break; + } + } + let result: u32 = groups + .iter() + .map(Group::badge_priority) + .map(Result::unwrap) + .sum(); + + println!("Part 2: {}", result); + } +} diff --git a/src/lib.rs b/src/lib.rs index 24dfd6a..4cb8f38 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,6 @@ pub mod day01; pub mod day02; +pub mod day03; use crate::BufReadResult::{BufferingError, EndOfBlock, EndOfInput, PartialBlock}; use serde_derive::Deserialize; From 209e2d6fe225ae069197d2f759d4c8e0c0ac695b Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Sat, 3 Dec 2022 21:52:21 -0800 Subject: [PATCH 020/142] Day 4 --- sample/day-04.txt | 6 +++ src/day04.rs | 113 ++++++++++++++++++++++++++++++++++++++++++++++ src/lib.rs | 1 + 3 files changed, 120 insertions(+) create mode 100644 sample/day-04.txt create mode 100644 src/day04.rs diff --git a/sample/day-04.txt b/sample/day-04.txt new file mode 100644 index 0000000..99a66c5 --- /dev/null +++ b/sample/day-04.txt @@ -0,0 +1,6 @@ +2-4,6-8 +2-3,4-5 +5-7,7-9 +2-8,3-7 +6-6,4-6 +2-6,4-8 \ No newline at end of file diff --git a/src/day04.rs b/src/day04.rs new file mode 100644 index 0000000..3ae072b --- /dev/null +++ b/src/day04.rs @@ -0,0 +1,113 @@ +/// --- Day 4: Camp Cleanup --- +/// https://adventofcode.com/2022/day/4 +use std::str::FromStr; + +use crate::get_lines; + +pub type SectionId = u8; + +/// Someone responsible for cleaning a section of the camp +pub struct Elf { + lower_section_id: SectionId, + upper_section_id: SectionId, +} + +impl Elf { + /// Determine if this Elf's realm of responsibility fully encompasses that of the other elf + pub fn fully_contains(&self, other: &Self) -> bool { + self.lower_section_id <= other.lower_section_id + && self.upper_section_id >= other.upper_section_id + } +} + +impl FromStr for Elf { + type Err = &'static str; + + fn from_str(s: &str) -> Result { + let mut components = s.split('-'); + let lower_section_id = components + .next() + .ok_or("No section range defined")? + .parse::() + .map_err(|_| "Unparseable lower bound")?; + let upper_section_id = components + .next() + .ok_or("Range has no upper bound")? + .parse::() + .map_err(|_| "Unparseable upper bound")?; + if components.next().is_some() { + return Err("Invalid section range"); + } + Ok(Self { + lower_section_id, + upper_section_id, + }) + } +} + +/// Two crew members responsible for cleaning part of the camp +pub struct Pair(Elf, Elf); + +impl Pair { + /// Identify an inefficiency in which one elf's responsibility fully encompasses the other's + pub fn one_fully_contains_the_other(&self) -> bool { + self.0.fully_contains(&self.1) || self.1.fully_contains(&self.0) + } + + /// Identity an inefficiency in which there is at least one section for which both elves are + /// responsible + pub fn sections_overlap(&self) -> bool { + (self.0.lower_section_id <= self.1.lower_section_id + && self.0.upper_section_id >= self.1.lower_section_id) + || (self.1.lower_section_id <= self.0.lower_section_id + && self.1.upper_section_id >= self.0.lower_section_id) + } +} + +impl FromStr for Pair { + type Err = &'static str; + + fn from_str(s: &str) -> Result { + let mut components = s.split(','); + let x = components + .next() + .ok_or("No pair of elves defined")? + .parse::()?; + let y = components + .next() + .ok_or("Only one elf found")? + .parse::()?; + if components.next().is_some() { + return Err("Too many elves specified"); + } + Ok(Self(x, y)) + } +} + +pub fn get_input() -> impl Iterator { + get_lines("day-04.txt") + .map(|line| line.parse::()) + .map(Result::unwrap) +} + +#[cfg(test)] +mod tests { + + use crate::day04::{get_input, Pair}; + + #[test] + fn part1() { + let result = get_input() + .filter(Pair::one_fully_contains_the_other) + .count(); + + println!("Part 1: {}", result); + } + + #[test] + fn part2() { + let result = get_input().filter(Pair::sections_overlap).count(); + + println!("Part 2: {}", result); + } +} diff --git a/src/lib.rs b/src/lib.rs index 4cb8f38..1b5b742 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,7 @@ pub mod day01; pub mod day02; pub mod day03; +pub mod day04; use crate::BufReadResult::{BufferingError, EndOfBlock, EndOfInput, PartialBlock}; use serde_derive::Deserialize; From d5845424b685b4a2892509c968a238f863574ab7 Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Sun, 4 Dec 2022 16:13:54 -0800 Subject: [PATCH 021/142] Simplify Day 1 logic --- src/day01.rs | 41 ++++++++++++++++------------------------- 1 file changed, 16 insertions(+), 25 deletions(-) diff --git a/src/day01.rs b/src/day01.rs index 78a5595..7547291 100644 --- a/src/day01.rs +++ b/src/day01.rs @@ -1,28 +1,18 @@ -use crate::get_lines; +/// --- Day 1: Calorie Counting --- +/// https://adventofcode.com/2022/day/1 + +use crate::get_block_strings; use std::cmp::Ordering; +type CalorieCount = u32; + pub fn get_elves(max: usize) -> Vec { - let mut calories_carried = 0usize; let mut result = vec![]; - for line in get_lines("day-01.txt") { - if line.is_empty() { - let elf = Elf { calories_carried }; - calories_carried = 0; - - let index = match result.binary_search(&elf) { - Ok(index) => index, - Err(index) => index, - }; - result.insert(index, elf); - if result.len() > max { - result.remove(result.len() - 1); - } - } else { - calories_carried += line.parse::().unwrap(); - } - } - if calories_carried > 0 { - let elf = Elf { calories_carried }; + for elf in get_block_strings("day-01.txt") + .map(|block| block.split('\n') + .map(|line| line.parse::().expect("Invalid calorie count")) + .sum()) + .map(|calories_carried| Elf { calories_carried }) { let index = match result.binary_search(&elf) { Ok(index) => index, Err(index) => index, @@ -37,7 +27,7 @@ pub fn get_elves(max: usize) -> Vec { #[derive(Debug)] pub struct Elf { - calories_carried: usize, + calories_carried: CalorieCount, } impl Eq for Elf {} @@ -62,19 +52,20 @@ impl Ord for Elf { #[cfg(test)] mod tests { - use crate::day01::get_elves; + use crate::day01::{CalorieCount, get_elves}; #[test] fn part1() { let elves = get_elves(1); + let result: CalorieCount = elves.iter().map(|elf| elf.calories_carried).sum(); - println!("Part 1: {}", elves[0].calories_carried); + println!("Part 1: {}", result); } #[test] fn part2() { let elves = get_elves(3); - let result: usize = elves.iter().map(|elf| elf.calories_carried).sum(); + let result: CalorieCount = elves.iter().map(|elf| elf.calories_carried).sum(); println!("Part 2: {}", result); } From cbccdeb4966fea6d3c1ef338d1063128903acf85 Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Mon, 5 Dec 2022 09:01:03 -0800 Subject: [PATCH 022/142] Day 5 --- sample/day-05.txt | 9 +++ src/day01.rs | 15 ++-- src/day05.rs | 184 ++++++++++++++++++++++++++++++++++++++++++++++ src/lib.rs | 1 + 4 files changed, 203 insertions(+), 6 deletions(-) create mode 100644 sample/day-05.txt create mode 100644 src/day05.rs diff --git a/sample/day-05.txt b/sample/day-05.txt new file mode 100644 index 0000000..e98aba4 --- /dev/null +++ b/sample/day-05.txt @@ -0,0 +1,9 @@ + [D] +[N] [C] +[Z] [M] [P] + 1 2 3 + +move 1 from 2 to 1 +move 3 from 1 to 3 +move 2 from 2 to 1 +move 1 from 1 to 2 \ No newline at end of file diff --git a/src/day01.rs b/src/day01.rs index 7547291..ffe3bc4 100644 --- a/src/day01.rs +++ b/src/day01.rs @@ -1,6 +1,5 @@ /// --- Day 1: Calorie Counting --- /// https://adventofcode.com/2022/day/1 - use crate::get_block_strings; use std::cmp::Ordering; @@ -9,10 +8,14 @@ type CalorieCount = u32; pub fn get_elves(max: usize) -> Vec { let mut result = vec![]; for elf in get_block_strings("day-01.txt") - .map(|block| block.split('\n') - .map(|line| line.parse::().expect("Invalid calorie count")) - .sum()) - .map(|calories_carried| Elf { calories_carried }) { + .map(|block| { + block + .split('\n') + .map(|line| line.parse::().expect("Invalid calorie count")) + .sum() + }) + .map(|calories_carried| Elf { calories_carried }) + { let index = match result.binary_search(&elf) { Ok(index) => index, Err(index) => index, @@ -52,7 +55,7 @@ impl Ord for Elf { #[cfg(test)] mod tests { - use crate::day01::{CalorieCount, get_elves}; + use crate::day01::{get_elves, CalorieCount}; #[test] fn part1() { diff --git a/src/day05.rs b/src/day05.rs new file mode 100644 index 0000000..c5da4ae --- /dev/null +++ b/src/day05.rs @@ -0,0 +1,184 @@ +/// --- Day 5: --- +/// https://adventofcode.com/2022/day/5 +use crate::get_block_strings; +use std::borrow::BorrowMut; +use std::collections::VecDeque; +use std::str::FromStr; + +pub fn get_part1_input() -> (Vec>, Vec) { + let mut iterator = get_block_strings("day-05.txt"); + let stacks = iterator.next().expect("Stack specification is missing"); + let stacks = parse_stacks(&stacks); + let instructions = iterator.next().expect("Instructions missing"); + let instructions = instructions + .split('\n') + .map(|line| line.parse::()) + .map(Result::unwrap) + .collect::>(); + (stacks, instructions) +} + +pub fn get_part2_input() -> (Vec>, Vec) { + let mut iterator = get_block_strings("day-05.txt"); + let stacks = iterator.next().expect("Stack specification is missing"); + let stacks = parse_stacks(&stacks); + let instructions = iterator.next().expect("Instructions missing"); + let instructions = instructions + .split('\n') + .map(|line| line.parse::()) + .map(Result::unwrap) + .collect::>(); + (stacks, instructions) +} + +fn parse_stacks(lines: &str) -> Vec> { + let mut stacks = vec![VecDeque::new(); 9]; + for line in lines.split('\n') { + let mut stack_index = None; + for (i, c) in line.chars().enumerate() { + if c == '[' { + stack_index = Some(i / 4); + } else if let Some(index) = stack_index { + stacks[index].push_back(c); + stack_index = None; + } + } + } + stacks +} + +pub trait Instruction: FromStr { + fn execute(&self, stacks: Vec>) -> Vec>; +} + +pub struct CrateMover9000Instruction { + count: usize, + from: usize, + to: usize, +} + +impl FromStr for CrateMover9000Instruction { + type Err = String; + + fn from_str(line: &str) -> Result { + let mut components = line.split(' '); + let count = components + .nth(1) + .ok_or_else(|| "count not specified".to_string())? + .parse::() + .map_err(|parse_error| format!("Unable to parse count: {}", parse_error))?; + let from = components + .nth(1) + .ok_or_else(|| "Source stack not specified".to_string())? + .parse::() + .map_err(|parse_error| format!("Unable to parse source stack: {}", parse_error))? + - 1; + let to = components + .nth(1) + .ok_or_else(|| "Destination stack not specified".to_string())? + .parse::() + .map_err(|parse_error| format!("Unable to parse destination stack: {}", parse_error))? + - 1; + Ok(Self { count, from, to }) + } +} + +impl Instruction for CrateMover9000Instruction { + fn execute(&self, mut stacks: Vec>) -> Vec> { + let s: &mut [VecDeque] = stacks.borrow_mut(); + for _ in 0..self.count { + let tmp = s[self.from].pop_front(); + s[self.to].push_front( + tmp.expect("CrateMover attempted to remove an item from an empty stack"), + ); + } + s.to_vec() + } +} + +pub struct CrateMover9001Instruction { + count: usize, + from: usize, + to: usize, +} + +impl FromStr for CrateMover9001Instruction { + type Err = String; + + fn from_str(line: &str) -> Result { + let mut components = line.split(' '); + let count = components + .nth(1) + .ok_or_else(|| "count not specified".to_string())? + .parse::() + .map_err(|parse_error| format!("Unable to parse count: {}", parse_error))?; + let from = components + .nth(1) + .ok_or_else(|| "Source stack not specified".to_string())? + .parse::() + .map_err(|parse_error| format!("Unable to parse source stack: {}", parse_error))? + - 1; + let to = components + .nth(1) + .ok_or_else(|| "Destination stack not specified".to_string())? + .parse::() + .map_err(|parse_error| format!("Unable to parse destination stack: {}", parse_error))? + - 1; + Ok(Self { count, from, to }) + } +} + +impl Instruction for CrateMover9001Instruction { + fn execute(&self, mut stacks: Vec>) -> Vec> { + let mut buffer = VecDeque::with_capacity(self.count); + for _ in 0..self.count { + buffer.push_front( + stacks[self.from] + .pop_front() + .expect("CrateMover attempted to remove an item from an empty stack"), + ); + } + while let Some(item) = buffer.pop_front() { + stacks[self.to].push_front(item); + } + stacks + } +} + +pub fn summarise_stacks(stacks: &Vec>) -> String { + let mut result = String::new(); + for stack in stacks { + if let Some(c) = stack.front() { + result.push(*c); + } + } + result +} + +#[cfg(test)] +mod tests { + + use crate::day05::{get_part1_input, get_part2_input, summarise_stacks, Instruction}; + + #[test] + fn part1() { + let (mut stacks, instructions) = get_part1_input(); + for instruction in instructions { + stacks = instruction.execute(stacks); + } + let result = summarise_stacks(&stacks); + + println!("Part 1: {}", result); + } + + #[test] + fn part2() { + let (mut stacks, instructions) = get_part2_input(); + for instruction in instructions { + stacks = instruction.execute(stacks); + } + let result = summarise_stacks(&stacks); + + println!("Part 2: {}", result); + } +} diff --git a/src/lib.rs b/src/lib.rs index 1b5b742..e1ed572 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,6 +2,7 @@ pub mod day01; pub mod day02; pub mod day03; pub mod day04; +pub mod day05; use crate::BufReadResult::{BufferingError, EndOfBlock, EndOfInput, PartialBlock}; use serde_derive::Deserialize; From 696e9366c8140f922803935bb37c17a16720003c Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Mon, 5 Dec 2022 21:42:37 -0800 Subject: [PATCH 023/142] Day 6 --- sample/day-06.txt | 1 + src/day06.rs | 67 +++++++++++++++++++++++++++++++++++++++++++++++ src/lib.rs | 3 +++ 3 files changed, 71 insertions(+) create mode 100644 sample/day-06.txt create mode 100644 src/day06.rs diff --git a/sample/day-06.txt b/sample/day-06.txt new file mode 100644 index 0000000..5a2b0a7 --- /dev/null +++ b/sample/day-06.txt @@ -0,0 +1 @@ +mjqjpqmgbljsphdztnvjfqwrcgsmlb \ No newline at end of file diff --git a/src/day06.rs b/src/day06.rs new file mode 100644 index 0000000..731b8b9 --- /dev/null +++ b/src/day06.rs @@ -0,0 +1,67 @@ +/// --- Day 6: Tuning Trouble --- +/// https://adventofcode.com/2022/day/6 +use crate::get_lines; +use std::collections::{BTreeSet, VecDeque}; + +/// Characters received by the Elves' handheld communication device +pub fn get_signal() -> String { + get_lines("day-06.txt").next().expect("No signal detected") +} + +/// Determine which character of the buffer contains the start of a packet +/// Returns: +/// - `Some(usize)` - the index of the first packet if one exists +/// - `None` - if no packet is found +pub fn get_start_of_packet(data_stream: String) -> Result { + let distinct_characters = 4; + let error = "No start of packet found"; + get_marker_position(data_stream, distinct_characters, error) +} + +/// Determine which character of the buffer contains the start of the message +/// Returns: +/// - `Some(usize)` - the index of the start of the message if one exists +/// - `None` if there is no message +pub fn get_start_of_message(data_stream: String) -> Result { + get_marker_position(data_stream, 14, "No message found") +} + +fn get_marker_position( + data_stream: String, + distinct_characters: usize, + error: &str, +) -> Result { + let mut buffer = VecDeque::new(); + for (index, c) in data_stream.chars().enumerate() { + if buffer.len() < distinct_characters { + buffer.push_back(c); + continue; + } + let set = buffer.iter().copied().collect::>(); + if set.len() >= buffer.len() { + return Ok(index); + } + buffer.pop_front(); + buffer.push_back(c); + } + Err(error) +} + +#[cfg(test)] +mod tests { + use crate::day06::{get_signal, get_start_of_message, get_start_of_packet}; + + #[test] + fn part1() { + let result = get_start_of_packet(get_signal()).unwrap(); + + println!("Part 1: {}", result); + } + + #[test] + fn part2() { + let result = get_start_of_message(get_signal()).unwrap(); + + println!("Part 2: {}", result); + } +} diff --git a/src/lib.rs b/src/lib.rs index e1ed572..6384ac8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,8 +1,11 @@ +extern crate core; + pub mod day01; pub mod day02; pub mod day03; pub mod day04; pub mod day05; +pub mod day06; use crate::BufReadResult::{BufferingError, EndOfBlock, EndOfInput, PartialBlock}; use serde_derive::Deserialize; From 1dcb7c2b5b16ae422ea3157003c4f8ce94237d4e Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Wed, 7 Dec 2022 00:24:19 -0800 Subject: [PATCH 024/142] Day 7 --- Cargo.lock | 27 ++++ Cargo.toml | 9 +- sample/day-07.txt | 23 ++++ src/day07.rs | 328 ++++++++++++++++++++++++++++++++++++++++++++++ src/lib.rs | 1 + 5 files changed, 386 insertions(+), 2 deletions(-) create mode 100644 sample/day-07.txt create mode 100644 src/day07.rs diff --git a/Cargo.lock b/Cargo.lock index 708f578..825b84e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,6 +13,7 @@ dependencies = [ "serde_derive", "toml", "unicode-segmentation", + "uuid", ] [[package]] @@ -101,6 +102,17 @@ dependencies = [ "byteorder", ] +[[package]] +name = "getrandom" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + [[package]] name = "hashers" version = "1.0.1" @@ -274,3 +286,18 @@ name = "unicode-segmentation" version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" + +[[package]] +name = "uuid" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" diff --git a/Cargo.toml b/Cargo.toml index 2d9b969..4e51908 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "advent-of-code" -version = "0.2020.0" +version = "0.2022.0" authors = ["Carlos Macasaet "] edition = "2018" @@ -13,4 +13,9 @@ regex = "1" serde = "1.0.148" serde_derive = "1.0.148" toml = "0.5.9" -unicode-segmentation = "1.10.0" \ No newline at end of file +unicode-segmentation = "1.10.0" +[dependencies.uuid] +version = "1.2.2" +features = [ + "v4", +] \ No newline at end of file diff --git a/sample/day-07.txt b/sample/day-07.txt new file mode 100644 index 0000000..bcbb513 --- /dev/null +++ b/sample/day-07.txt @@ -0,0 +1,23 @@ +$ cd / +$ ls +dir a +14848514 b.txt +8504156 c.dat +dir d +$ cd a +$ ls +dir e +29116 f +2557 g +62596 h.lst +$ cd e +$ ls +584 i +$ cd .. +$ cd .. +$ cd d +$ ls +4060174 j +8033020 d.log +5626152 d.ext +7214296 k \ No newline at end of file diff --git a/src/day07.rs b/src/day07.rs new file mode 100644 index 0000000..ef1b901 --- /dev/null +++ b/src/day07.rs @@ -0,0 +1,328 @@ +use crate::day07::Line::{ChangeDirectory, DirectoryListing, FileListing, ListContents}; +/// --- Day 7: No Space Left On Device --- +/// https://adventofcode.com/2022/day/7 +use crate::get_lines; +use std::collections::HashMap; +use std::fmt::{Debug, Formatter}; +use std::str::FromStr; +use uuid::Uuid; + +pub struct Session { + file_system: FileSystem, + working_directory: Uuid, +} + +impl Session { + pub fn find_directories_smaller_than(&self, max_size: usize) -> Vec<(Uuid, usize)> { + let root = self + .file_system + .directories + .get(&self.file_system.root) + .unwrap(); // FIXME error handling + self.file_system + .find_directories_smaller_than(root, max_size) + .0 + } + pub fn find_directories_larger_than(&self, min_size: usize) -> Vec<(Uuid, usize)> { + let root = self + .file_system + .directories + .get(&self.file_system.root) + .unwrap(); // FIXME error handling + self.file_system + .find_directories_larger_than(root, min_size) + .0 + } +} + +impl Default for Session { + fn default() -> Self { + let file_system = FileSystem::default(); + let working_directory = file_system.root; + Self { + file_system, + working_directory, + } + } +} + +pub struct FileSystem { + directories: HashMap, + parents: HashMap, + files: HashMap, + root: Uuid, +} + +impl FileSystem { + pub fn consumed_space(&self) -> usize { + self.directory_size(self.directories.get(&self.root).unwrap()) + } + + fn directory_size(&self, directory: &Directory) -> usize { + let mut result = 0; + for sub in directory.sub_directories.values() { + let sub = self.directories.get(sub).unwrap(); + result += self.directory_size(sub); + } + for file in &directory.files { + let file = self.files.get(file).unwrap(); + result += file.size; + } + result + } + + pub fn insert_file(&mut self, parent_directory_id: Uuid, file: File) { + let file_id = file.id; + self.files.insert(file_id, file); + // TODO should return Result + let parent_directory = self + .directories + .get_mut(&parent_directory_id) + .expect("No such parent directory"); + parent_directory.files.push(file_id); + self.parents.insert(file_id, parent_directory_id); + } + + pub fn insert_directory(&mut self, parent_directory_id: Uuid, directory: Directory) { + let directory_id = directory.id; + let directory_name = directory.name.clone(); + self.directories.insert(directory_id, directory); + // TODO should return Result + let parent_directory = self + .directories + .get_mut(&parent_directory_id) + .expect("No such parent directory"); + parent_directory + .sub_directories + .insert(directory_name, directory_id); + self.parents.insert(directory_id, parent_directory_id); + } + + pub fn find_directories_smaller_than( + &self, + parent: &Directory, + max_size: usize, + ) -> (Vec<(Uuid, usize)>, usize) { + let mut list = vec![]; + let mut total_size = 0; + for sub_directory_id in parent.sub_directories.values() { + let sub_directory = self.directories.get(sub_directory_id).unwrap(); // TODO better error handling + let (items, sub_directory_size) = + self.find_directories_smaller_than(sub_directory, max_size); + total_size += sub_directory_size; + list = vec![list, items].concat(); + } + for file_id in &parent.files { + if total_size > max_size { + break; + } + let file = self.files.get(file_id).unwrap(); // TODO better error handling + total_size += file.size; + } + if total_size < max_size { + list.push((parent.id, total_size)); + } + (list, total_size) + } + + pub fn find_directories_larger_than( + &self, + parent: &Directory, + min_size: usize, + ) -> (Vec<(Uuid, usize)>, usize) { + let mut list = vec![]; + let mut total_size = 0; + for sub_directory_id in parent.sub_directories.values() { + let sub_directory = self.directories.get(sub_directory_id).unwrap(); // TODO better error handling + let (items, sub_directory_size) = + self.find_directories_larger_than(sub_directory, min_size); + total_size += sub_directory_size; + list = vec![list, items].concat(); + } + for file_id in &parent.files { + let file = self.files.get(file_id).unwrap(); // TODO better error handling + total_size += file.size; + } + if total_size >= min_size { + list.push((parent.id, total_size)); + } + (list, total_size) + } +} + +impl Default for FileSystem { + fn default() -> Self { + let root = Directory { + id: Default::default(), + name: "/".to_string(), + sub_directories: Default::default(), + files: Default::default(), + }; + let root_id = root.id; + let mut directories = HashMap::new(); + directories.insert(root_id, root); + Self { + directories, + parents: HashMap::new(), + files: HashMap::new(), + root: root_id, + } + } +} + +pub struct Directory { + id: Uuid, + name: String, + sub_directories: HashMap, + files: Vec, +} + +impl Debug for Directory { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + write!(f, "Directory{{ name: {}, id: {} }}", self.name, self.id) + } +} + +pub struct File { + id: Uuid, + // name: String, + size: usize, +} + +#[derive(Debug)] +pub enum Line { + ListContents, + ChangeDirectory(String), + DirectoryListing(String), + FileListing(usize, String), +} + +impl Line { + pub fn execute(&self, session: &mut Session) { + match self { + ListContents => {} + ChangeDirectory(target) => { + if target == ".." { + let parent_id = session + .file_system + .parents + .get(&session.working_directory) + .unwrap(); + session.working_directory = *parent_id; + } else if target == "/" { + session.working_directory = session.file_system.root; + } else { + let current = session + .file_system + .directories + .get(&session.working_directory) + .unwrap(); + let target = current.sub_directories.get(target).unwrap_or_else(|| { + panic!( + "Directory {:?} does not contain a sub-directory named {}", + current, target + ) + }); + session.working_directory = *target; + } + } + DirectoryListing(name) => { + let directory = Directory { + id: Uuid::new_v4(), + name: name.to_string(), + sub_directories: Default::default(), + files: Default::default(), + }; + session + .file_system + .insert_directory(session.working_directory, directory); + } + FileListing(size, _name) => { + let file = File { + id: Uuid::new_v4(), + // name: _name.to_string(), + size: *size, + }; + session + .file_system + .insert_file(session.working_directory, file); + } + } + } +} + +impl FromStr for Line { + type Err = (); + + fn from_str(line: &str) -> Result { + let mut components = line.split(' '); + let first_token = components.next().unwrap(); // TODO error handling + match first_token { + "$" => { + let second_token = components.next().unwrap(); // TODO error handling + match second_token { + "cd" => { + let argument = components.next().unwrap().to_string(); + Ok(ChangeDirectory(argument)) + } + "ls" => Ok(ListContents), + other_command => { + eprintln!("Unknown command: {}", other_command); + panic!() + } + } + } + "dir" => { + let name = components.next().unwrap().to_string(); + Ok(DirectoryListing(name)) + } + number => { + let size = number.parse::().unwrap(); + let name = components.next().unwrap().to_string(); + Ok(FileListing(size, name)) + } + } + } +} + +pub fn get_input() -> impl Iterator { + get_lines("day-07.txt") + .map(|line| line.parse::()) + .map(Result::unwrap) +} + +#[cfg(test)] +mod tests { + + use crate::day07::{get_input, Session}; + + #[test] + fn part1() { + let mut session = Session::default(); + get_input().for_each(|line| line.execute(&mut session)); + let result: usize = session + .find_directories_smaller_than(100_000) + .iter() + .map(|item| item.1) + .sum(); + + println!("Part 1: {}", result); + } + + #[test] + fn part2() { + let mut session = Session::default(); + get_input().for_each(|line| line.execute(&mut session)); + let consumed = session.file_system.consumed_space(); + let unused = 70_000_000 - consumed; + let required = 30_000_000 - unused; + let result: usize = session + .find_directories_larger_than(required) + .iter() + .map(|item| item.1) + .min() + .unwrap(); + + println!("Part 2: {}", result); + } +} diff --git a/src/lib.rs b/src/lib.rs index 6384ac8..47bafc9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,6 +6,7 @@ pub mod day03; pub mod day04; pub mod day05; pub mod day06; +pub mod day07; use crate::BufReadResult::{BufferingError, EndOfBlock, EndOfInput, PartialBlock}; use serde_derive::Deserialize; From 17294fc89ce9c3dacf90a712af104496ae3c41b0 Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Wed, 7 Dec 2022 22:08:18 -0800 Subject: [PATCH 025/142] Day 8 --- Cargo.lock | 2 +- sample/day-08.txt | 5 ++ src/day08.rs | 153 ++++++++++++++++++++++++++++++++++++++++++++++ src/lib.rs | 1 + 4 files changed, 160 insertions(+), 1 deletion(-) create mode 100644 sample/day-08.txt create mode 100644 src/day08.rs diff --git a/Cargo.lock b/Cargo.lock index 825b84e..bbf4785 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "advent-of-code" -version = "0.2020.0" +version = "0.2022.0" dependencies = [ "hashers", "rayon", diff --git a/sample/day-08.txt b/sample/day-08.txt new file mode 100644 index 0000000..6557024 --- /dev/null +++ b/sample/day-08.txt @@ -0,0 +1,5 @@ +30373 +25512 +65332 +33549 +35390 \ No newline at end of file diff --git a/src/day08.rs b/src/day08.rs new file mode 100644 index 0000000..f4579e2 --- /dev/null +++ b/src/day08.rs @@ -0,0 +1,153 @@ +/// --- Day 8: Treetop Tree House --- +/// https://adventofcode.com/2022/day/8 +use crate::get_lines; + +/// A "peculiar patch of tall trees all planted carefully in a grid" as part of a reforestation +/// effort. +pub struct Forest { + /// The heights of the trees + heights: Vec>, +} + +impl Forest { + /// Determine how many trees in the forest are visible from outside the forest (from any side) + pub fn count_visible_trees(&self) -> usize { + let mut result = 0; + for i in 0..self.heights.len() { + for j in 0..self.heights[i].len() { + if self.is_visible(i, j) { + result += 1; + } + } + } + result + } + + /// Determine if a tree is visible from outside the forest, that is, not obstructed by other + /// trees from any side + fn is_visible(&self, x: usize, y: usize) -> bool { + let tree_height = self.heights[x][y]; + let mut visible_from_north = true; + for i in 0..x { + if self.heights[i][y] >= tree_height { + visible_from_north = false; + break; + } + } + if visible_from_north { + return true; + } + let mut visible_from_south = true; + for i in x + 1..self.heights.len() { + if self.heights[i][y] >= tree_height { + visible_from_south = false; + break; + } + } + if visible_from_south { + return true; + } + let mut visible_from_west = true; + for j in 0..y { + if self.heights[x][j] >= tree_height { + visible_from_west = false; + break; + } + } + if visible_from_west { + return true; + } + for j in y + 1..self.heights[x].len() { + if self.heights[x][j] >= tree_height { + return false; + } + } + true + } + + /// Determine the best possible view from any treetop in the forest + pub fn max_scenic_score(&self) -> usize { + let mut result = 0; + for i in 0..self.heights.len() { + for j in 0..self.heights[i].len() { + let score = self.scenic_score(i, j); + if score > result { + result = score; + } + } + } + result + } + + /// A score that rewards coördinates from which the most trees are visible + /// + /// Parameters: + /// - `(x, y)` - the potential position in the forest to build a treetop tree house + fn scenic_score(&self, x: usize, y: usize) -> usize { + let tree_height = self.heights[x][y]; + let mut north_score = 0; + for i in (0..x).rev() { + let height = self.heights[i][y]; + north_score += 1; + if height >= tree_height { + break; + } + } + let mut south_score = 0; + for i in x + 1..self.heights.len() { + let height = self.heights[i][y]; + south_score += 1; + if height >= tree_height { + break; + } + } + let mut west_score = 0; + for j in (0..y).rev() { + let height = self.heights[x][j]; + west_score += 1; + if height >= tree_height { + break; + } + } + let mut east_score = 0; + for j in y + 1..self.heights[x].len() { + let height = self.heights[x][j]; + east_score += 1; + if height >= tree_height { + break; + } + } + north_score * east_score * south_score * west_score + } +} + +pub fn get_input() -> Forest { + let heights = get_lines("day-08.txt") + .map(|line| { + line.chars() + .map(|height| height.to_digit(10).expect("Invalid tree height") as u8) + .collect::>() + }) + .collect::>>(); + Forest { heights } +} + +#[cfg(test)] +mod tests { + + use crate::day08::get_input; + + #[test] + fn part1() { + let result = get_input().count_visible_trees(); + + println!("Part 1: {}", result); + } + + #[test] + fn part2() { + let result = get_input().max_scenic_score(); + + println!("Part 2: {}", result); + } +} diff --git a/src/lib.rs b/src/lib.rs index 47bafc9..ec0d58d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,6 +7,7 @@ pub mod day04; pub mod day05; pub mod day06; pub mod day07; +pub mod day08; use crate::BufReadResult::{BufferingError, EndOfBlock, EndOfInput, PartialBlock}; use serde_derive::Deserialize; From b2fd7da2d43d36cad8c532a7c8ce4fbfc8a461b2 Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Wed, 7 Dec 2022 22:21:01 -0800 Subject: [PATCH 026/142] Fix test failures with sample input From now on, the input parsing code will not trim lines since leading whitespace is significant on some problems. --- src/day01.rs | 2 ++ src/day05.rs | 4 ++++ src/lib.rs | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/day01.rs b/src/day01.rs index ffe3bc4..3b1b39b 100644 --- a/src/day01.rs +++ b/src/day01.rs @@ -11,6 +11,8 @@ pub fn get_elves(max: usize) -> Vec { .map(|block| { block .split('\n') + .map(str::trim) + .filter(|line| !line.is_empty()) .map(|line| line.parse::().expect("Invalid calorie count")) .sum() }) diff --git a/src/day05.rs b/src/day05.rs index c5da4ae..6edb225 100644 --- a/src/day05.rs +++ b/src/day05.rs @@ -12,6 +12,8 @@ pub fn get_part1_input() -> (Vec>, Vec let instructions = iterator.next().expect("Instructions missing"); let instructions = instructions .split('\n') + .map(str::trim) + .filter(|line| !line.is_empty()) .map(|line| line.parse::()) .map(Result::unwrap) .collect::>(); @@ -25,6 +27,8 @@ pub fn get_part2_input() -> (Vec>, Vec let instructions = iterator.next().expect("Instructions missing"); let instructions = instructions .split('\n') + .map(str::trim) + .filter(|line| !line.is_empty()) .map(|line| line.parse::()) .map(Result::unwrap) .collect::>(); diff --git a/src/lib.rs b/src/lib.rs index ec0d58d..e13757e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -122,7 +122,7 @@ impl Iterator for Blocks { match &self.try_read(previous_byte) { EndOfInput => { if !bytes.is_empty() { - result = Some(String::from_utf8_lossy(&bytes).trim().to_string()); + result = Some(String::from_utf8_lossy(&bytes).to_string()); } complete = true; } @@ -132,7 +132,7 @@ impl Iterator for Blocks { } EndOfBlock(partial) => { bytes = [&bytes, *partial].concat(); - result = Some(String::from_utf8_lossy(&bytes).trim().to_string()); + result = Some(String::from_utf8_lossy(&bytes).to_string()); bytes_read = partial.len(); complete = true; } From d98d2ed9e9f8099920b191a0c410fa0f078a36de Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Thu, 8 Dec 2022 23:27:48 -0800 Subject: [PATCH 027/142] Day 9 --- sample/day-09.txt | 8 ++ src/day09.rs | 193 ++++++++++++++++++++++++++++++++++++++++++++++ src/lib.rs | 1 + 3 files changed, 202 insertions(+) create mode 100644 sample/day-09.txt create mode 100644 src/day09.rs diff --git a/sample/day-09.txt b/sample/day-09.txt new file mode 100644 index 0000000..cbea2b3 --- /dev/null +++ b/sample/day-09.txt @@ -0,0 +1,8 @@ +R 4 +U 4 +L 3 +D 1 +R 4 +D 1 +L 5 +R 2 \ No newline at end of file diff --git a/src/day09.rs b/src/day09.rs new file mode 100644 index 0000000..4566e2d --- /dev/null +++ b/src/day09.rs @@ -0,0 +1,193 @@ +use crate::day09::Direction::{Down, Left, Right, Up}; +use crate::get_lines; +use std::cmp::Ordering; +use std::collections::hash_map::Entry; +use std::collections::{HashMap, HashSet}; +use std::str::FromStr; + +/// --- Day 9: Rope Bridge --- +/// https://adventofcode.com/2022/day/9 + +#[derive(Default, Copy, Clone, Eq, PartialEq)] +pub struct Coordinate { + x: i32, + y: i32, +} + +impl Coordinate { + pub fn distance(&self, other: &Self) -> usize { + ((self.x as f64 - other.x as f64).powf(2f64) + (self.y as f64 - other.y as f64).powf(2f64)) + .sqrt() as usize + } + + pub fn step(&mut self, distance: (i32, i32)) { + self.x += distance.0; + self.y += distance.1; + } + + pub fn step_towards(&mut self, leader: &Self) { + let x_distance = match leader.x.cmp(&self.x) { + Ordering::Less => -1, + Ordering::Equal => 0, + Ordering::Greater => 1, + }; + let y_distance = match leader.y.cmp(&self.y) { + Ordering::Less => -1, + Ordering::Equal => 0, + Ordering::Greater => 1, + }; + self.step((x_distance, y_distance)); + } +} + +pub enum Direction { + Up, + Down, + Left, + Right, +} + +impl Direction { + pub fn step(&self) -> (i32, i32) { + match self { + Up => (-1, 0), + Down => (1, 0), + Left => (0, -1), + Right => (0, 1), + } + } +} + +impl FromStr for Direction { + type Err = (); + + fn from_str(s: &str) -> Result { + match s { + "U" => Ok(Up), + "D" => Ok(Down), + "L" => Ok(Left), + "R" => Ok(Right), + _ => Err(()), + } + } +} + +pub struct Instruction { + direction: Direction, + distance: u16, +} + +impl FromStr for Instruction { + type Err = (); + + fn from_str(line: &str) -> Result { + let mut components = line.split(' '); + let direction = components + .next() + .expect("No direction specified") + .parse::() + .expect("Unparseable direction"); + let distance = components + .next() + .expect("No distance specified") + .parse::() + .expect("Unparseable distance"); + Ok(Self { + direction, + distance, + }) + } +} + +pub struct Rope { + knot_coordinates: Vec, + visited: HashMap>, +} + +impl Rope { + pub fn count_visited(&self) -> usize { + let mut result = 0; + for bucket in self.visited.values() { + result += bucket.len(); + } + result + } + + pub fn process(&mut self, instruction: &Instruction) { + let step = instruction.direction.step(); + for _ in 0..instruction.distance { + self.knot_coordinates[0].step(step); + for j in 1..self.knot_coordinates.len() { + self.move_knot(j); + } + } + } + + fn move_knot(&mut self, knot_index: usize) { + let leader = self.knot_coordinates[knot_index - 1]; + let mut follower = self.knot_coordinates[knot_index]; + if leader == follower || leader.distance(&follower) <= 1 { + return; + } + + follower.step_towards(&leader); + self.knot_coordinates[knot_index] = follower; + + if knot_index == &self.knot_coordinates.len() - 1 { + match self.visited.entry(follower.x) { + Entry::Occupied(o) => { + o.into_mut().insert(follower.y); + } + Entry::Vacant(v) => { + let mut bucket = HashSet::new(); + bucket.insert(follower.y); + v.insert(bucket); + } + } + } + } +} + +impl From for Rope { + fn from(num_knots: usize) -> Self { + let knot_coordinates = vec![Coordinate::default(); num_knots]; + let mut visited = HashMap::default(); + let mut bucket = HashSet::new(); + bucket.insert(0i32); + visited.insert(0, bucket); + Self { + knot_coordinates, + visited, + } + } +} + +pub fn get_input() -> impl Iterator { + get_lines("day-09.txt") + .map(|line| line.parse::()) + .map(Result::unwrap) +} + +#[cfg(test)] +mod tests { + + use crate::day09::{get_input, Rope}; + + #[test] + fn part1() { + let mut rope: Rope = 2usize.into(); + get_input().for_each(|instruction| rope.process(&instruction)); + let result = rope.count_visited(); + + println!("Part 1: {}", result); + } + + #[test] + fn part2() { + let mut rope: Rope = 10usize.into(); + get_input().for_each(|instruction| rope.process(&instruction)); + let result = rope.count_visited(); + + println!("Part 2: {}", result); + } +} diff --git a/src/lib.rs b/src/lib.rs index e13757e..0c033c9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,6 +8,7 @@ pub mod day05; pub mod day06; pub mod day07; pub mod day08; +pub mod day09; use crate::BufReadResult::{BufferingError, EndOfBlock, EndOfInput, PartialBlock}; use serde_derive::Deserialize; From fb9267b5f77cbb706d4c9c1950b46f63e89b213a Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Fri, 9 Dec 2022 23:28:22 -0800 Subject: [PATCH 028/142] Day 10 --- sample/day-10.txt | 146 +++++++++++++++++++++++++++++++++++ src/day10.rs | 193 ++++++++++++++++++++++++++++++++++++++++++++++ src/lib.rs | 1 + 3 files changed, 340 insertions(+) create mode 100644 sample/day-10.txt create mode 100644 src/day10.rs diff --git a/sample/day-10.txt b/sample/day-10.txt new file mode 100644 index 0000000..94cd0a8 --- /dev/null +++ b/sample/day-10.txt @@ -0,0 +1,146 @@ +addx 15 +addx -11 +addx 6 +addx -3 +addx 5 +addx -1 +addx -8 +addx 13 +addx 4 +noop +addx -1 +addx 5 +addx -1 +addx 5 +addx -1 +addx 5 +addx -1 +addx 5 +addx -1 +addx -35 +addx 1 +addx 24 +addx -19 +addx 1 +addx 16 +addx -11 +noop +noop +addx 21 +addx -15 +noop +noop +addx -3 +addx 9 +addx 1 +addx -3 +addx 8 +addx 1 +addx 5 +noop +noop +noop +noop +noop +addx -36 +noop +addx 1 +addx 7 +noop +noop +noop +addx 2 +addx 6 +noop +noop +noop +noop +noop +addx 1 +noop +noop +addx 7 +addx 1 +noop +addx -13 +addx 13 +addx 7 +noop +addx 1 +addx -33 +noop +noop +noop +addx 2 +noop +noop +noop +addx 8 +noop +addx -1 +addx 2 +addx 1 +noop +addx 17 +addx -9 +addx 1 +addx 1 +addx -3 +addx 11 +noop +noop +addx 1 +noop +addx 1 +noop +noop +addx -13 +addx -19 +addx 1 +addx 3 +addx 26 +addx -30 +addx 12 +addx -1 +addx 3 +addx 1 +noop +noop +noop +addx -9 +addx 18 +addx 1 +addx 2 +noop +noop +addx 9 +noop +noop +noop +addx -1 +addx 2 +addx -37 +addx 1 +addx 3 +noop +addx 15 +addx -21 +addx 22 +addx -6 +addx 1 +noop +addx 2 +addx 1 +noop +addx -10 +noop +noop +addx 20 +addx 1 +addx 2 +addx 2 +addx -6 +addx -11 +noop +noop +noop \ No newline at end of file diff --git a/src/day10.rs b/src/day10.rs new file mode 100644 index 0000000..5bed630 --- /dev/null +++ b/src/day10.rs @@ -0,0 +1,193 @@ +use crate::day10::Instruction::{AddX, NoOp}; +use crate::get_lines; +use std::fmt::{Display, Formatter}; +use std::str::FromStr; + +/// --- Day 10: Cathode-Ray Tube --- +/// https://adventofcode.com/2022/day/10 + +/// The state of the central processing unit in the Elves' handheld device at a given point in time +pub struct ProcessorState { + /// The clock cycle indicating the point in time this state was in effect + cycle: u16, + /// The `X` register of the processor + register: i32, +} + +impl ProcessorState { + /// A measurable aspect of the processor that is derived from the current clock cycle and the + /// register's value + pub fn signal_strength(&self) -> i32 { + (self.cycle as i32) * self.register + } +} + +impl Default for ProcessorState { + fn default() -> Self { + Self { + cycle: 1, + register: 1, + } + } +} + +/// A low-level instruction for the Elves' handheld device +pub enum Instruction { + /// Do nothing + NoOp, + + /// Increase the `X` register by the value specified + AddX(i32), +} + +impl Instruction { + /// The number of clock cycles it takes this instruction to complete + fn cycles(&self) -> usize { + match self { + AddX(_) => 2, + _ => 1, + } + } + + /// Execute a single instruction. The instruction may take multiple cycles to complete and a + /// separate processor state is emitted for each cycle elapsed. + pub fn execute(&self, current_state: &ProcessorState) -> Vec { + let mut result = vec![]; + let mut inc = 1; + for _ in 0..self.cycles() - 1 { + result.push(ProcessorState { + cycle: current_state.cycle + inc, + register: current_state.register, + }); + inc += 1; + } + let last = match self { + NoOp => ProcessorState { + cycle: current_state.cycle + inc, + register: current_state.register, + }, + AddX(argument) => ProcessorState { + cycle: current_state.cycle + inc, + register: current_state.register + argument, + }, + }; + result.push(last); + result + } +} + +impl FromStr for Instruction { + type Err = &'static str; + + fn from_str(line: &str) -> Result { + let mut components = line.split(' '); + let instruction = components.next().expect("Instruction not specified"); + if instruction == "noop" { + return Ok(NoOp); + } else if instruction == "addx" { + let argument = components + .next() + .expect("Argument required") + .parse::() + .expect("Unparseable argument"); + return Ok(AddX(argument)); + } + Err("Unrecognised instruction") + } +} + +/// The CRT display on the Elves' handheld device +pub struct HandheldDisplay { + pixels: [[char; 40]; 6], +} + +impl HandheldDisplay { + /// Update the pixels based on the current processor state + pub fn update(&mut self, state: &ProcessorState) { + let pixel_index = (state.cycle - 1) as usize; + + // Part or all of the sprite might be off screen + let mut sprite_positions = vec![]; + if state.register > 0 { + sprite_positions.push((state.register - 1) as usize); + } + if state.register >= 0 { + sprite_positions.push(state.register as usize); + } + if state.register + 1 >= 0 { + sprite_positions.push((state.register + 1) as usize); + } + + // determine which pixel is currently being drawn + let row = pixel_index / 40; + let column = pixel_index % 40; + if row < self.pixels.len() { + self.pixels[row][column] = if sprite_positions.contains(&column) { + '#' + } else { + '.' + }; + } + } +} + +impl Display for HandheldDisplay { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + for i in 0..self.pixels.len() { + writeln!(f, "{}", self.pixels[i].iter().collect::())?; + } + Ok(()) + } +} + +impl Default for HandheldDisplay { + fn default() -> Self { + Self { + pixels: [['.'; 40]; 6], + } + } +} + +pub fn get_input() -> impl Iterator { + get_lines("day-10.txt") + .map(|line| line.parse::()) + .map(Result::unwrap) +} + +#[cfg(test)] +mod tests { + + use crate::day10::{get_input, HandheldDisplay, ProcessorState}; + + #[test] + fn part1() { + let interesting_cycles = vec![20u16, 60, 100, 140, 180, 220]; + let mut state: ProcessorState = Default::default(); + let mut total_signal_strength = 0; + for instruction in get_input() { + for result in instruction.execute(&state) { + if interesting_cycles.contains(&result.cycle) { + total_signal_strength += result.signal_strength(); + } + state = result; + } + } + + println!("Part 1: {}", total_signal_strength); + } + + #[test] + fn part2() { + let mut state: ProcessorState = Default::default(); + let mut display: HandheldDisplay = Default::default(); + display.update(&state); + for instruction in get_input() { + for result in instruction.execute(&state) { + display.update(&result); + state = result; + } + } + + println!("Part 2:\n{}", display); + } +} diff --git a/src/lib.rs b/src/lib.rs index 0c033c9..1cccdf5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,6 +9,7 @@ pub mod day06; pub mod day07; pub mod day08; pub mod day09; +pub mod day10; use crate::BufReadResult::{BufferingError, EndOfBlock, EndOfInput, PartialBlock}; use serde_derive::Deserialize; From 1315216592f85b84f8b30c63997930f40a02f908 Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Sun, 11 Dec 2022 18:38:45 -0800 Subject: [PATCH 029/142] Day 11 --- Cargo.lock | 1 + Cargo.toml | 1 + sample/day-11.txt | 27 +++++ src/day11.rs | 272 ++++++++++++++++++++++++++++++++++++++++++++++ src/lib.rs | 2 + 5 files changed, 303 insertions(+) create mode 100644 sample/day-11.txt create mode 100644 src/day11.rs diff --git a/Cargo.lock b/Cargo.lock index bbf4785..c645dcc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7,6 +7,7 @@ name = "advent-of-code" version = "0.2022.0" dependencies = [ "hashers", + "lazy_static", "rayon", "regex", "serde", diff --git a/Cargo.toml b/Cargo.toml index 4e51908..fbb7aca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ edition = "2018" [dependencies] hashers = "1.0.1" +lazy_static = "1.4.0" rayon = "1.6.0" regex = "1" serde = "1.0.148" diff --git a/sample/day-11.txt b/sample/day-11.txt new file mode 100644 index 0000000..c04eddb --- /dev/null +++ b/sample/day-11.txt @@ -0,0 +1,27 @@ +Monkey 0: + Starting items: 79, 98 + Operation: new = old * 19 + Test: divisible by 23 + If true: throw to monkey 2 + If false: throw to monkey 3 + +Monkey 1: + Starting items: 54, 65, 75, 74 + Operation: new = old + 6 + Test: divisible by 19 + If true: throw to monkey 2 + If false: throw to monkey 0 + +Monkey 2: + Starting items: 79, 60, 97 + Operation: new = old * old + Test: divisible by 13 + If true: throw to monkey 1 + If false: throw to monkey 3 + +Monkey 3: + Starting items: 74 + Operation: new = old + 3 + Test: divisible by 17 + If true: throw to monkey 0 + If false: throw to monkey 1 \ No newline at end of file diff --git a/src/day11.rs b/src/day11.rs new file mode 100644 index 0000000..e334213 --- /dev/null +++ b/src/day11.rs @@ -0,0 +1,272 @@ +use crate::get_block_strings; +use lazy_static::lazy_static; +use regex::Regex; +use std::str::FromStr; +use Operator::{Add, Multiply}; +use ValueSupplier::{Literal, OldValue}; + +/// --- Day 11: Monkey in the Middle --- +/// https://adventofcode.com/2022/day/11 + +pub type Int = u64; + +/// A description of how a specific monkey handles your belongings in response to your worry level. +#[derive(Clone)] +pub struct Monkey { + /// Your worry level for each item the monkey has + items: Vec, + /// How your worry level changes when this monkey inspects each item + operation: Operation, + /// A factor in what the monkey chooses to do with each item + divisor: Int, + /// The recipient ID if the test passes + target_if_true: usize, + /// The recipient ID if the test fails + target_if_false: usize, + /// The total number of times this monkey has inspected any item + items_inspected: usize, +} + +impl Monkey { + /// Inspect the items in possession and throw them to other monkeys as necessary. + /// + /// Note this method assumes that a monkey cannot throw an item to themself. + pub fn inspect_items(&mut self, worry_updater: &dyn Fn(&Int) -> Int) -> Vec { + let result = self + .items + .iter() + .map(|worry_level| -> Throw { + let worry_level = self.operation.apply(worry_level); + let worry_level = worry_updater(&worry_level); + let destination_monkey_id = if worry_level % self.divisor == 0 { + self.target_if_true + } else { + self.target_if_false + }; + Throw { + destination_monkey_id, + worry_level, + } + }) + .collect::>(); + self.items_inspected += result.len(); + self.items.clear(); + result + } +} + +impl FromStr for Monkey { + type Err = (); + + fn from_str(block: &str) -> Result { + lazy_static! { + static ref NOT_A_NUMBER: Regex = Regex::new("[^0-9]").unwrap(); + } + let mut lines = block.split('\n').skip(1); + let items = lines + .next() + .expect("Starting items not specified") + .trim() + .replace("Starting items: ", "") + .split(", ") + .map(|item_string| item_string.parse::()) + .map(Result::unwrap) + .collect::>(); + let operation = lines + .next() + .expect("Operation not specified") + .parse::() + .expect("Unparseable operation"); + let divisor = NOT_A_NUMBER + .replace_all(lines.next().expect("Divisor not specified"), "") + .parse::() + .expect("Unparseable divisor"); + let target_if_true = NOT_A_NUMBER + .replace_all(lines.next().expect("Target if true not specified"), "") + .parse::() + .expect("Unparseable target if true"); + let target_if_false = NOT_A_NUMBER + .replace_all(lines.next().expect("Target if false not specified"), "") + .parse::() + .expect("Unparseable target if true"); + Ok(Self { + items, + operation, + divisor, + target_if_true, + target_if_false, + items_inspected: 0, + }) + } +} + +/// The side effect of a monkey inspecting an item, a throw to another monkey. +pub struct Throw { + #[allow(dead_code)] + destination_monkey_id: usize, + #[allow(dead_code)] + worry_level: Int, +} + +#[derive(Copy, Clone)] +enum Operator { + Add, + Multiply, +} + +impl Operator { + pub fn apply(&self, x: &Int, y: &Int) -> Int { + match self { + Add => x + y, + Multiply => x * y, + } + } +} + +impl FromStr for Operator { + type Err = (); + + fn from_str(s: &str) -> Result { + match s { + "*" => Ok(Multiply), + "+" => Ok(Add), + _ => Err(()), + } + } +} + +#[derive(Copy, Clone)] +enum ValueSupplier { + OldValue, + Literal(Int), +} + +impl ValueSupplier { + fn get_value(&self, old_value: &Int) -> Int { + match self { + OldValue => *old_value, + Literal(literal) => *literal, + } + } +} + +#[derive(Copy, Clone)] +struct Operation { + operator: Operator, + x_value_supplier: ValueSupplier, + y_value_supplier: ValueSupplier, +} + +impl Operation { + pub fn apply(&self, old_value: &Int) -> Int { + let x = self.x_value_supplier.get_value(old_value); + let y = self.y_value_supplier.get_value(old_value); + self.operator.apply(&x, &y) + } +} + +impl FromStr for Operation { + type Err = (); + + fn from_str(line: &str) -> Result { + let trimmed = line.trim(); + assert!(trimmed.starts_with("Operation:")); + let mut components = trimmed.split(' ').skip(3); + let x_value_supplier = match components.next().expect("First parameter is missing") { + "old" => OldValue, + numeric => { + let literal = numeric.parse::().expect("Unparseable parameter"); + Literal(literal) + } + }; + let operator = components + .next() + .expect("Operator is missing") + .parse::() + .expect("Unparseable operator"); + let y_value_supplier = match components.next().expect("Second parameter is missing") { + "old" => OldValue, + numeric => { + let literal = numeric.parse::().expect("Unparseable parameter"); + Literal(literal) + } + }; + Ok(Self { + operator, + x_value_supplier, + y_value_supplier, + }) + } +} + +/// Parse the descriptions of the monkeys' behaviour. The Monkey's ID is its index in the vector. +pub fn get_input() -> Vec { + get_block_strings("day-11.txt") + .map(|block| block.parse::()) + .map(Result::unwrap) + .collect() +} + +#[cfg(test)] +pub mod tests { + + use crate::day11::{get_input, Int}; + + #[test] + pub fn part1() { + let mut monkeys = get_input(); + fn update_worry_level(worry_level: &Int) -> Int { + worry_level / 3 + } + for _round in 0..20 { + for i in 0..monkeys.len() { + let mut monkey = monkeys[i].clone(); + let throws = monkey.inspect_items(&update_worry_level); + monkeys[i] = monkey; + for throw in throws { + let mut target = monkeys[throw.destination_monkey_id].clone(); + target.items.push(throw.worry_level); + monkeys[throw.destination_monkey_id] = target; + } + } + } + let mut counts = monkeys + .iter() + .map(|monkey| monkey.items_inspected) + .collect::>(); + counts.sort_unstable_by(|x, y| y.cmp(x)); + let result = counts[0] * counts[1]; + println!("Part 1: {}", result); + } + + #[test] + pub fn part2() { + let mut monkeys = get_input(); + let product_of_divisors = monkeys + .iter() + .map(|monkey| monkey.divisor) + .reduce(|x, y| x * y) + .expect("No monkeys found"); + let update_worry_level = + move |worry_level: &Int| -> Int { worry_level % product_of_divisors }; + for _round in 0..10_000 { + for i in 0..monkeys.len() { + let mut monkey = monkeys[i].clone(); + let throws = monkey.inspect_items(&update_worry_level); + monkeys[i] = monkey; + for throw in throws { + let mut target = monkeys[throw.destination_monkey_id].clone(); + target.items.push(throw.worry_level); + monkeys[throw.destination_monkey_id] = target; + } + } + } + let mut counts = monkeys + .iter() + .map(|monkey| monkey.items_inspected) + .collect::>(); + counts.sort_unstable_by(|x, y| y.cmp(x)); + let result = counts[0] * counts[1]; + println!("Part 2: {}", result); + } +} diff --git a/src/lib.rs b/src/lib.rs index 1cccdf5..0d9c7ff 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,5 @@ extern crate core; +extern crate lazy_static; pub mod day01; pub mod day02; @@ -10,6 +11,7 @@ pub mod day07; pub mod day08; pub mod day09; pub mod day10; +pub mod day11; use crate::BufReadResult::{BufferingError, EndOfBlock, EndOfInput, PartialBlock}; use serde_derive::Deserialize; From 54b3966c066149ebde7dd7138f720c1cb18d50fa Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Sun, 11 Dec 2022 18:42:35 -0800 Subject: [PATCH 030/142] Fix links to other editions --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a8d007d..4e19014 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,6 @@ ## Other Editions -* 2020 Advent of Code ( [Java](https://github.com/l0s/advent-of-code-java/tree/2020) | [Rust](https://github.com/l0s/advent-of-code-rust/releases/tag/y2020) ) -* 2021 Advent of Code ( [Java](https://github.com/l0s/advent-of-code-java/releases/tag/2021) ) +* 2020 Advent of Code ( [Java](https://github.com/l0s/advent-of-code-java/tree/2020) | [Rust](https://github.com/l0s/advent-of-code-rust/tree/y2020) ) +* 2021 Advent of Code ( [Java](https://github.com/l0s/advent-of-code-java/tree/2021) ) * 2022 Advent of Code ( [Java](https://github.com/l0s/advent-of-code-java) ) From 3a30ce9d473b51f7a108b590f050fa111408beba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Dec 2022 05:03:44 +0000 Subject: [PATCH 031/142] Bump serde from 1.0.148 to 1.0.150 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.148 to 1.0.150. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.148...v1.0.150) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c645dcc..0b8d0f1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -241,9 +241,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.148" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e53f64bb4ba0191d6d0676e1b141ca55047d83b74f5607e6d8eb88126c52c2dc" +checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index fbb7aca..919c320 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.6.0" regex = "1" -serde = "1.0.148" +serde = "1.0.150" serde_derive = "1.0.148" toml = "0.5.9" unicode-segmentation = "1.10.0" From 392de68e8b6d8ee5c64dd4d51e5459e45ca623c7 Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Sun, 11 Dec 2022 23:54:10 -0800 Subject: [PATCH 032/142] Day 12 --- sample/day-12.txt | 5 ++ src/day12.rs | 191 ++++++++++++++++++++++++++++++++++++++++++++++ src/lib.rs | 1 + 3 files changed, 197 insertions(+) create mode 100644 sample/day-12.txt create mode 100644 src/day12.rs diff --git a/sample/day-12.txt b/sample/day-12.txt new file mode 100644 index 0000000..86e9cac --- /dev/null +++ b/sample/day-12.txt @@ -0,0 +1,5 @@ +Sabqponm +abcryxxl +accszExk +acctuvwj +abdefghi diff --git a/src/day12.rs b/src/day12.rs new file mode 100644 index 0000000..2b3cfff --- /dev/null +++ b/src/day12.rs @@ -0,0 +1,191 @@ +use crate::get_lines; +use std::cmp::Ordering; +use std::collections::{BinaryHeap, HashMap}; + +/// --- Day 12: Hill Climbing Algorithm --- +/// https://adventofcode.com/2022/day/12 + +/// A map of the local area in a grid +pub struct HeightMap { + grid: Vec>, + #[allow(dead_code)] + starting_point: (usize, usize), + destination: (usize, usize), +} + +impl HeightMap { + pub fn length_of_shortest_path(&self, starting_point: &(usize, usize)) -> usize { + let mut shortest_path_to_node: HashMap<(usize, usize), usize> = HashMap::new(); + shortest_path_to_node.insert(*starting_point, 0usize); + let mut estimated_cost_to_destination: HashMap<(usize, usize), usize> = HashMap::new(); + estimated_cost_to_destination.insert( + *starting_point, + Self::estimate_distance(starting_point, &self.destination), + ); + let mut open_set: BinaryHeap = BinaryHeap::new(); + open_set.push(Node { + coordinate: *starting_point, + estimated_cost_to_destination: Self::estimate_distance( + starting_point, + &self.destination, + ), + }); + while let Some(current) = open_set.pop() { + if current.coordinate == self.destination { + return shortest_path_to_node[¤t.coordinate]; + } + for neighbour in self.neighbours(¤t.coordinate) { + let tentative_score = shortest_path_to_node[¤t.coordinate] + 1; + if tentative_score < *shortest_path_to_node.get(&neighbour).unwrap_or(&usize::MAX) { + shortest_path_to_node.insert(neighbour, tentative_score); + let estimate = + tentative_score + Self::estimate_distance(&neighbour, &self.destination); + estimated_cost_to_destination.insert(neighbour, estimate); + let node = Node { + coordinate: neighbour, + estimated_cost_to_destination: estimate, + }; + open_set.push(node); + } + } + } + usize::MAX + } + + pub fn potential_trail_heads(&self) -> Vec<(usize, usize)> { + let mut result = vec![]; + for i in 0..self.grid.len() { + let row = &self.grid[i]; + for (j, c) in row.iter().enumerate() { + if *c == 0 { + result.push((i, j)); + } + } + } + result + } + + fn height(&self, coördinate: &(usize, usize)) -> u8 { + self.grid[coördinate.0][coördinate.1] + } + + fn neighbours(&self, coördinate: &(usize, usize)) -> Vec<(usize, usize)> { + let mut result = Vec::with_capacity(4); + if coördinate.0 > 0 { + let up = (coördinate.0 - 1, coördinate.1); + if self.height(coördinate) + 1 >= self.height(&up) { + result.push(up); + } + } + if coördinate.0 < self.grid.len() - 1 { + let down = (coördinate.0 + 1, coördinate.1); + if self.height(coördinate) + 1 >= self.height(&down) { + result.push(down); + } + } + if coördinate.1 > 0 { + let left = (coördinate.0, coördinate.1 - 1); + if self.height(coördinate) + 1 >= self.height(&left) { + result.push(left); + } + } + let row = &self.grid[coördinate.0]; + if coördinate.1 < row.len() - 1 { + let right = (coördinate.0, coördinate.1 + 1); + if self.height(coördinate) + 1 >= self.height(&right) { + result.push(right); + } + } + result + } + + fn estimate_distance(from: &(usize, usize), to: &(usize, usize)) -> usize { + from.0.abs_diff(to.0) + from.1.abs_diff(to.1) + } +} + +struct Node { + coordinate: (usize, usize), + estimated_cost_to_destination: usize, +} + +impl Eq for Node {} + +impl PartialEq for Node { + fn eq(&self, other: &Self) -> bool { + self.coordinate.eq(&other.coordinate) + } +} + +impl PartialOrd for Node { + fn partial_cmp(&self, other: &Self) -> Option { + other + .estimated_cost_to_destination + .partial_cmp(&self.estimated_cost_to_destination) + } +} + +impl Ord for Node { + fn cmp(&self, other: &Self) -> Ordering { + other + .estimated_cost_to_destination + .cmp(&self.estimated_cost_to_destination) + } +} + +pub fn get_input() -> HeightMap { + let lines = get_lines("day-12.txt") + .map(|line| line.chars().collect::>()) + .collect::>>(); + let mut grid: Vec> = vec![vec![]; lines.len()]; + let (mut start_x, mut start_y) = (0usize, 0usize); + let (mut destination_x, mut destination_y) = (0usize, 0usize); + for i in 0..lines.len() { + let row = &lines[i]; + grid[i] = vec![0; row.len()]; + for (j, c) in row.iter().enumerate() { + if *c == 'S' { + start_x = i; + start_y = j; + grid[i][j] = 0; + } else if *c == 'E' { + destination_x = i; + destination_y = j; + grid[i][j] = b'z' - b'a'; + } else { + grid[i][j] = *c as u8 - b'a'; + } + } + } + HeightMap { + grid, + starting_point: (start_x, start_y), + destination: (destination_x, destination_y), + } +} + +#[cfg(test)] +pub mod tests { + + use crate::day12::get_input; + + #[test] + pub fn part1() { + let map = get_input(); + let result = map.length_of_shortest_path(&map.starting_point); + println!("Part 1: {}", result); + } + + #[test] + pub fn part2() { + let map = get_input(); + let mut result = usize::MAX; + for potential_trail_head in map.potential_trail_heads() { + let distance = map.length_of_shortest_path(&potential_trail_head); + if distance < result { + result = distance; + } + } + println!("Part 2: {}", result); + } +} diff --git a/src/lib.rs b/src/lib.rs index 0d9c7ff..92e3e05 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,6 +12,7 @@ pub mod day08; pub mod day09; pub mod day10; pub mod day11; +pub mod day12; use crate::BufReadResult::{BufferingError, EndOfBlock, EndOfInput, PartialBlock}; use serde_derive::Deserialize; From c15fe6cd5906fda6d8ed0bf65978c6ef5046cf13 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Dec 2022 07:56:57 +0000 Subject: [PATCH 033/142] Bump serde_derive from 1.0.148 to 1.0.150 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.148 to 1.0.150. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.148...v1.0.150) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0b8d0f1..943960e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -247,9 +247,9 @@ checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" [[package]] name = "serde_derive" -version = "1.0.148" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a55492425aa53521babf6137309e7d34c20bbfbbfcfe2c7f3a047fd1f6b92c0c" +checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 919c320..e0f72a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ lazy_static = "1.4.0" rayon = "1.6.0" regex = "1" serde = "1.0.150" -serde_derive = "1.0.148" +serde_derive = "1.0.150" toml = "0.5.9" unicode-segmentation = "1.10.0" [dependencies.uuid] From 1cddd7f54f4f902e1312bbbb31e8eb3dadea0f69 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Dec 2022 07:59:50 +0000 Subject: [PATCH 034/142] Bump rayon from 1.6.0 to 1.6.1 Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.6.0 to 1.6.1. - [Release notes](https://github.com/rayon-rs/rayon/releases) - [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md) - [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.6.0...rayon-core-v1.6.1) --- updated-dependencies: - dependency-name: rayon dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 5 ++--- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 943960e..be7a1e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -195,11 +195,10 @@ dependencies = [ [[package]] name = "rayon" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e060280438193c554f654141c9ea9417886713b7acd75974c85b18a69a88e0b" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "crossbeam-deque", "either", "rayon-core", ] diff --git a/Cargo.toml b/Cargo.toml index e0f72a7..0741207 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] hashers = "1.0.1" lazy_static = "1.4.0" -rayon = "1.6.0" +rayon = "1.6.1" regex = "1" serde = "1.0.150" serde_derive = "1.0.150" From 795dede502579b22145383f4238f9ca4cd4755c6 Mon Sep 17 00:00:00 2001 From: Carlos Macasaet Date: Thu, 15 Dec 2022 18:57:26 -0800 Subject: [PATCH 035/142] Day 13 --- sample/day-13.txt | 23 ++++++++ src/day13.rs | 143 ++++++++++++++++++++++++++++++++++++++++++++++ src/lib.rs | 1 + 3 files changed, 167 insertions(+) create mode 100644 sample/day-13.txt create mode 100644 src/day13.rs diff --git a/sample/day-13.txt b/sample/day-13.txt new file mode 100644 index 0000000..27c8912 --- /dev/null +++ b/sample/day-13.txt @@ -0,0 +1,23 @@ +[1,1,3,1,1] +[1,1,5,1,1] + +[[1],[2,3,4]] +[[1],4] + +[9] +[[8,7,6]] + +[[4,4],4,4] +[[4,4],4,4,4] + +[7,7,7,7] +[7,7,7] + +[] +[3] + +[[[]]] +[[]] + +[1,[2,[3,[4,[5,6,7]]]],8,9] +[1,[2,[3,[4,[5,6,0]]]],8,9] \ No newline at end of file diff --git a/src/day13.rs b/src/day13.rs new file mode 100644 index 0000000..db6cf73 --- /dev/null +++ b/src/day13.rs @@ -0,0 +1,143 @@ +use crate::get_block_strings; +use std::cmp::Ordering; +use std::cmp::Ordering::Equal; +use std::str::FromStr; +use PacketItem::{List, Literal}; + +/// --- Day 13: Distress Signal --- +/// https://adventofcode.com/2022/day/13 + +#[derive(Clone)] +pub enum PacketItem { + List(Box>), + Literal(u16), +} + +impl Eq for PacketItem {} + +impl PartialEq for PacketItem { + fn eq(&self, other: &Self) -> bool { + self.cmp(other) == Equal + } +} + +impl PartialOrd for PacketItem { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) + } +} + +impl Ord for PacketItem { + fn cmp(&self, other: &Self) -> Ordering { + match self { + List(items) => match other { + List(other_items) => { + let common_length = items.len().min(other_items.len()); + let mut x_iter = items.iter().take(common_length); + let mut y_iter = other_items.iter().take(common_length); + while let (Some(x), Some(y)) = (x_iter.next(), y_iter.next()) { + let result = x.cmp(y); + if result != Equal { + return result; + } + } + items.len().cmp(&other_items.len()) + } + Literal(other_value) => self.cmp(&List(Box::new(vec![Literal(*other_value)]))), + }, + Literal(value) => match other { + List(other_items) => { + List(Box::new(vec![Literal(*value)])).cmp(&List(Box::new(other_items.to_vec()))) + } + Literal(other_value) => value.cmp(other_value), + }, + } + } +} + +impl FromStr for PacketItem { + type Err = (); + + fn from_str(line: &str) -> Result { + let mut stack: Vec> = vec![]; + + let mut number_buffer = String::new(); + for c in line.chars() { + if c == '[' { + stack.push(vec![]); + } else if c == ']' { + if !number_buffer.is_empty() { + let number = number_buffer.parse::().unwrap(); + number_buffer.clear(); + let mut last = stack.pop().unwrap(); + last.push(Literal(number)); + stack.push(last); + } + if stack.len() > 1 { + let completed = stack.pop().unwrap(); + let mut last = stack.pop().unwrap(); + last.push(List(Box::new(completed))); + stack.push(last); + } + } else if c == ',' { + if !number_buffer.is_empty() { + let number = number_buffer.parse::().unwrap(); + number_buffer.clear(); + let mut last = stack.pop().unwrap(); + last.push(Literal(number)); + stack.push(last); + } + } else { + number_buffer.push(c); + } + } + + // currently cannot parse a number literal on its own + Ok(List(Box::new(stack.pop().unwrap()))) + } +} + +pub fn get_input() -> impl Iterator { + get_block_strings("day-13.txt").map(|block| -> (PacketItem, PacketItem) { + let mut lines = block.split('\n'); + let left = lines.next().unwrap().parse::().unwrap(); + let right = lines.next().unwrap().parse::().unwrap(); + (left, right) + }) +} + +#[cfg(test)] +pub mod tests { + + use crate::day13::PacketItem::{List, Literal}; + use crate::day13::{get_input, PacketItem}; + + #[test] + pub fn part1() { + let mut result = 0; + for (i, pair) in get_input().enumerate() { + if pair.0 < pair.1 { + eprintln!("{}", i + 1); + result += i + 1; + } + } + println!("Part 1: {}", result); + } + + #[test] + pub fn part2() { + let mut packets = get_input() + .flat_map(|(x, y)| vec![x, y]) + .collect::>(); + packets.sort(); + + let divider_x = List(Box::new(vec![List(Box::new(vec![Literal(2)]))])); + let divider_y = List(Box::new(vec![List(Box::new(vec![Literal(6)]))])); + + let x_index = packets.binary_search(÷r_x).unwrap_err() + 1; + let y_index = packets.binary_search(÷r_y).unwrap_err() + 2; + let result = x_index * y_index; + + println!("Part 2: {}", result); + } +} diff --git a/src/lib.rs b/src/lib.rs index 92e3e05..6d19d31 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,6 +13,7 @@ pub mod day09; pub mod day10; pub mod day11; pub mod day12; +pub mod day13; use crate::BufReadResult::{BufferingError, EndOfBlock, EndOfInput, PartialBlock}; use serde_derive::Deserialize; From 8a6cc3107570340296c8af4ff8be3247c21f6cc8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Dec 2022 05:02:39 +0000 Subject: [PATCH 036/142] Bump serde_derive from 1.0.150 to 1.0.151 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.150 to 1.0.151. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.150...v1.0.151) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index be7a1e6..8184476 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -246,9 +246,9 @@ checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" [[package]] name = "serde_derive" -version = "1.0.150" +version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42a3df25b0713732468deadad63ab9da1f1fd75a48a15024b50363f128db627e" +checksum = "255abe9a125a985c05190d687b320c12f9b1f0b99445e608c21ba0782c719ad8" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 0741207..9cdd8af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ lazy_static = "1.4.0" rayon = "1.6.1" regex = "1" serde = "1.0.150" -serde_derive = "1.0.150" +serde_derive = "1.0.151" toml = "0.5.9" unicode-segmentation = "1.10.0" [dependencies.uuid] From 3ca38633cf431fbe3c76a3c87ae96bcce7f0503c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Dec 2022 06:45:56 +0000 Subject: [PATCH 037/142] Bump serde from 1.0.150 to 1.0.151 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.150 to 1.0.151. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.150...v1.0.151) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8184476..6f4a5a2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -240,9 +240,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.150" +version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e326c9ec8042f1b5da33252c8a37e9ffbd2c9bef0155215b6e6c80c790e05f91" +checksum = "97fed41fc1a24994d044e6db6935e69511a1153b52c15eb42493b26fa87feba0" [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index 9cdd8af..82239cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.6.1" regex = "1" -serde = "1.0.150" +serde = "1.0.151" serde_derive = "1.0.151" toml = "0.5.9" unicode-segmentation = "1.10.0" From 82cf56567a2bfa05a70d61a77b5e14dbff52b7de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Dec 2022 06:49:27 +0000 Subject: [PATCH 038/142] Bump toml from 0.5.9 to 0.5.10 Bumps [toml](https://github.com/toml-rs/toml) from 0.5.9 to 0.5.10. - [Release notes](https://github.com/toml-rs/toml/releases) - [Commits](https://github.com/toml-rs/toml/commits/toml-v0.5.10) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f4a5a2..604f0e5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -268,9 +268,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.9" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" +checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" dependencies = [ "serde", ] diff --git a/Cargo.toml b/Cargo.toml index 82239cf..0ad03a0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.6.1" regex = "1" serde = "1.0.151" serde_derive = "1.0.151" -toml = "0.5.9" +toml = "0.5.10" unicode-segmentation = "1.10.0" [dependencies.uuid] version = "1.2.2" From 94abf518b81fd46592ed280b803ca561f6e3601d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Jan 2023 05:02:02 +0000 Subject: [PATCH 039/142] Bump serde from 1.0.151 to 1.0.152 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.151 to 1.0.152. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.151...v1.0.152) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 604f0e5..f307256 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -240,9 +240,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.151" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fed41fc1a24994d044e6db6935e69511a1153b52c15eb42493b26fa87feba0" +checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index 0ad03a0..813665f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.6.1" regex = "1" -serde = "1.0.151" +serde = "1.0.152" serde_derive = "1.0.151" toml = "0.5.10" unicode-segmentation = "1.10.0" From ec3fe2ff4dc5e542314806447a2f2e6d6f27af99 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Jan 2023 05:02:08 +0000 Subject: [PATCH 040/142] Bump toml from 0.5.10 to 0.7.0 Bumps [toml](https://github.com/toml-rs/toml) from 0.5.10 to 0.7.0. - [Release notes](https://github.com/toml-rs/toml/releases) - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.5.10...toml-v0.7.0) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- Cargo.toml | 2 +- 2 files changed, 62 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f307256..d5495d3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -114,6 +114,12 @@ dependencies = [ "wasi", ] +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + [[package]] name = "hashers" version = "1.0.1" @@ -132,6 +138,16 @@ dependencies = [ "libc", ] +[[package]] +name = "indexmap" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +dependencies = [ + "autocfg", + "hashbrown", +] + [[package]] name = "lazy_static" version = "1.4.0" @@ -159,6 +175,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "nom8" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8" +dependencies = [ + "memchr", +] + [[package]] name = "num_cpus" version = "1.13.0" @@ -255,6 +280,15 @@ dependencies = [ "syn", ] +[[package]] +name = "serde_spanned" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c68e921cef53841b8925c2abadd27c9b891d9613bdc43d6b823062866df38e8" +dependencies = [ + "serde", +] + [[package]] name = "syn" version = "1.0.104" @@ -268,11 +302,36 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.10" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f560bc7fb3eb31f5eee1340c68a2160cad39605b7b9c9ec32045ddbdee13b85" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "886f31a9b85b6182cabd4d8b07df3b451afcc216563748201490940d2a28ed36" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" +checksum = "233d8716cdc5d20ec88a18a839edaf545edc71efa4a5ff700ef4a102c26cd8fa" dependencies = [ + "indexmap", + "nom8", "serde", + "serde_spanned", + "toml_datetime", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 813665f..20959d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.6.1" regex = "1" serde = "1.0.152" serde_derive = "1.0.151" -toml = "0.5.10" +toml = "0.7.0" unicode-segmentation = "1.10.0" [dependencies.uuid] version = "1.2.2" From b1cd98caf22dad5c82e2d5c4a90ab8f5fd0a4ca7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 06:17:30 +0000 Subject: [PATCH 041/142] Bump serde_derive from 1.0.151 to 1.0.152 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.151 to 1.0.152. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.151...v1.0.152) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d5495d3..0bf8624 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -271,9 +271,9 @@ checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" [[package]] name = "serde_derive" -version = "1.0.151" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "255abe9a125a985c05190d687b320c12f9b1f0b99445e608c21ba0782c719ad8" +checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 20959d5..db539f2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ lazy_static = "1.4.0" rayon = "1.6.1" regex = "1" serde = "1.0.152" -serde_derive = "1.0.151" +serde_derive = "1.0.152" toml = "0.7.0" unicode-segmentation = "1.10.0" [dependencies.uuid] From 3e121ba95f2021a89b1aca1fdc218a4fb4744f55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 06:18:22 +0000 Subject: [PATCH 042/142] Bump regex from 1.7.0 to 1.7.1 Bumps [regex](https://github.com/rust-lang/regex) from 1.7.0 to 1.7.1. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.7.0...1.7.1) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d5495d3..c3dfedb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -242,9 +242,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" +checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" dependencies = [ "aho-corasick", "memchr", From 27fbb584916aa1e938df455f8edf6987ab30081e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 15:11:27 +0000 Subject: [PATCH 043/142] Bump uuid from 1.2.2 to 1.3.0 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.2.2 to 1.3.0. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.2.2...1.3.0) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5ceb15a..dd786dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -348,9 +348,9 @@ checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" [[package]] name = "uuid" -version = "1.2.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" +checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" dependencies = [ "getrandom", ] diff --git a/Cargo.toml b/Cargo.toml index db539f2..87d7f8a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.152" toml = "0.7.0" unicode-segmentation = "1.10.0" [dependencies.uuid] -version = "1.2.2" +version = "1.3.0" features = [ "v4", ] \ No newline at end of file From 51d227244618cef25d7d398bb511c798b68d3aed Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 16:23:01 +0000 Subject: [PATCH 044/142] Bump unicode-segmentation from 1.10.0 to 1.10.1 Bumps [unicode-segmentation](https://github.com/unicode-rs/unicode-segmentation) from 1.10.0 to 1.10.1. - [Release notes](https://github.com/unicode-rs/unicode-segmentation/releases) - [Commits](https://github.com/unicode-rs/unicode-segmentation/compare/v1.10.0...v1.10.1) --- updated-dependencies: - dependency-name: unicode-segmentation dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dd786dc..272e96d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -342,9 +342,9 @@ checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" [[package]] name = "unicode-segmentation" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "uuid" diff --git a/Cargo.toml b/Cargo.toml index 87d7f8a..4e54418 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ regex = "1" serde = "1.0.152" serde_derive = "1.0.152" toml = "0.7.0" -unicode-segmentation = "1.10.0" +unicode-segmentation = "1.10.1" [dependencies.uuid] version = "1.3.0" features = [ From 9e0ca9331ba77ecf8dfd09feae8ac8fd44d4d987 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Feb 2023 18:39:51 +0000 Subject: [PATCH 045/142] Bump toml from 0.7.0 to 0.7.2 Bumps [toml](https://github.com/toml-rs/toml) from 0.7.0 to 0.7.2. - [Release notes](https://github.com/toml-rs/toml/releases) - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.7.0...toml-v0.7.2) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 272e96d..3d05321 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -282,9 +282,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c68e921cef53841b8925c2abadd27c9b891d9613bdc43d6b823062866df38e8" +checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4" dependencies = [ "serde", ] @@ -302,9 +302,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f560bc7fb3eb31f5eee1340c68a2160cad39605b7b9c9ec32045ddbdee13b85" +checksum = "f7afcae9e3f0fe2c370fd4657108972cbb2fa9db1b9f84849cefd80741b01cb6" dependencies = [ "serde", "serde_spanned", @@ -314,18 +314,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "886f31a9b85b6182cabd4d8b07df3b451afcc216563748201490940d2a28ed36" +checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.0" +version = "0.19.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d8716cdc5d20ec88a18a839edaf545edc71efa4a5ff700ef4a102c26cd8fa" +checksum = "5e6a7712b49e1775fb9a7b998de6635b299237f48b404dde71704f2e0e7f37e5" dependencies = [ "indexmap", "nom8", diff --git a/Cargo.toml b/Cargo.toml index 4e54418..041a034 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.6.1" regex = "1" serde = "1.0.152" serde_derive = "1.0.152" -toml = "0.7.0" +toml = "0.7.2" unicode-segmentation = "1.10.1" [dependencies.uuid] version = "1.3.0" From 4b9f4504ad041e7709f582724e2249291cadefd0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Mar 2023 05:59:18 +0000 Subject: [PATCH 046/142] Bump rayon from 1.6.1 to 1.7.0 Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.6.1 to 1.7.0. - [Release notes](https://github.com/rayon-rs/rayon/releases) - [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md) - [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.6.1...rayon-core-v1.7.0) --- updated-dependencies: - dependency-name: rayon dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3d05321..034e877 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -220,9 +220,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ "either", "rayon-core", @@ -230,9 +230,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ "crossbeam-channel", "crossbeam-deque", diff --git a/Cargo.toml b/Cargo.toml index 041a034..6415505 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] hashers = "1.0.1" lazy_static = "1.4.0" -rayon = "1.6.1" +rayon = "1.7.0" regex = "1" serde = "1.0.152" serde_derive = "1.0.152" From a4c9a26642f9264b60afeb6c3ef5ad3b8618b3a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Mar 2023 05:58:20 +0000 Subject: [PATCH 047/142] Bump serde from 1.0.152 to 1.0.155 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.152 to 1.0.155. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.152...v1.0.155) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 034e877..695d00a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -265,9 +265,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.152" +version = "1.0.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "71f2b4817415c6d4210bfe1c7bfcf4801b2d904cb4d0e1a8fdb651013c9e86b8" [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index 6415505..720d816 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" -serde = "1.0.152" +serde = "1.0.155" serde_derive = "1.0.152" toml = "0.7.2" unicode-segmentation = "1.10.1" From 9083f6e0428059091c497490de7e3002f0eaf93f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Mar 2023 14:48:25 +0000 Subject: [PATCH 048/142] Bump serde_derive from 1.0.152 to 1.0.155 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.152 to 1.0.155. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.152...v1.0.155) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 695d00a..4d54619 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -271,9 +271,9 @@ checksum = "71f2b4817415c6d4210bfe1c7bfcf4801b2d904cb4d0e1a8fdb651013c9e86b8" [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "d071a94a3fac4aff69d023a7f411e33f40f3483f8c5190b1953822b6b76d7630" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 720d816..a9d4975 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" serde = "1.0.155" -serde_derive = "1.0.152" +serde_derive = "1.0.155" toml = "0.7.2" unicode-segmentation = "1.10.1" [dependencies.uuid] From 3c26d3f52b6297d9bee2d59641250a101423afac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Mar 2023 05:58:42 +0000 Subject: [PATCH 049/142] Bump serde from 1.0.155 to 1.0.157 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.155 to 1.0.157. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.155...v1.0.157) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4d54619..9f4da0d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -265,9 +265,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.155" +version = "1.0.157" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71f2b4817415c6d4210bfe1c7bfcf4801b2d904cb4d0e1a8fdb651013c9e86b8" +checksum = "707de5fcf5df2b5788fca98dd7eab490bc2fd9b7ef1404defc462833b83f25ca" [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index a9d4975..8dc5dc6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" -serde = "1.0.155" +serde = "1.0.157" serde_derive = "1.0.155" toml = "0.7.2" unicode-segmentation = "1.10.1" From c0f12905ff515aa0df8ae665b394371ac4a1c208 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Mar 2023 15:55:08 +0000 Subject: [PATCH 050/142] Bump serde_derive from 1.0.155 to 1.0.158 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.155 to 1.0.158. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.155...v1.0.158) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9f4da0d..5c19902 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -202,18 +202,18 @@ checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.9" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] @@ -271,9 +271,9 @@ checksum = "707de5fcf5df2b5788fca98dd7eab490bc2fd9b7ef1404defc462833b83f25ca" [[package]] name = "serde_derive" -version = "1.0.155" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d071a94a3fac4aff69d023a7f411e33f40f3483f8c5190b1953822b6b76d7630" +checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" dependencies = [ "proc-macro2", "quote", @@ -291,9 +291,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.104" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae548ec36cf198c0ef7710d3c230987c2d6d7bd98ad6edc0274462724c585ce" +checksum = "e8234ae35e70582bfa0f1fedffa6daa248e41dd045310b19800c4a36382c8f60" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 8dc5dc6..e4655ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" serde = "1.0.157" -serde_derive = "1.0.155" +serde_derive = "1.0.158" toml = "0.7.2" unicode-segmentation = "1.10.1" [dependencies.uuid] From 1ac1c6e815e02198057e55db2df03f5e9c879721 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Mar 2023 03:14:53 +0000 Subject: [PATCH 051/142] Bump toml from 0.7.2 to 0.7.3 Bumps [toml](https://github.com/toml-rs/toml) from 0.7.2 to 0.7.3. - [Release notes](https://github.com/toml-rs/toml/releases) - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.7.2...toml-v0.7.3) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 28 ++++++++++++++-------------- Cargo.toml | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5c19902..9628f96 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -175,15 +175,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "nom8" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8" -dependencies = [ - "memchr", -] - [[package]] name = "num_cpus" version = "1.13.0" @@ -302,9 +293,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7afcae9e3f0fe2c370fd4657108972cbb2fa9db1b9f84849cefd80741b01cb6" +checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21" dependencies = [ "serde", "serde_spanned", @@ -323,15 +314,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.3" +version = "0.19.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6a7712b49e1775fb9a7b998de6635b299237f48b404dde71704f2e0e7f37e5" +checksum = "dc18466501acd8ac6a3f615dd29a3438f8ca6bb3b19537138b3106e575621274" dependencies = [ "indexmap", - "nom8", "serde", "serde_spanned", "toml_datetime", + "winnow", ] [[package]] @@ -360,3 +351,12 @@ name = "wasi" version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" + +[[package]] +name = "winnow" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d020b441f92996c80d94ae9166e8501e59c7bb56121189dc9eab3bd8216966" +dependencies = [ + "memchr", +] diff --git a/Cargo.toml b/Cargo.toml index e4655ae..1d4f33d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.7.0" regex = "1" serde = "1.0.157" serde_derive = "1.0.158" -toml = "0.7.2" +toml = "0.7.3" unicode-segmentation = "1.10.1" [dependencies.uuid] version = "1.3.0" From 604798763c45472a47d6fe22cc1810ac2ca84ce2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Mar 2023 05:59:17 +0000 Subject: [PATCH 052/142] Bump serde from 1.0.157 to 1.0.158 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.157 to 1.0.158. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.157...v1.0.158) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9628f96..c1388e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -256,9 +256,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.157" +version = "1.0.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "707de5fcf5df2b5788fca98dd7eab490bc2fd9b7ef1404defc462833b83f25ca" +checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9" [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index 1d4f33d..4910f64 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" -serde = "1.0.157" +serde = "1.0.158" serde_derive = "1.0.158" toml = "0.7.3" unicode-segmentation = "1.10.1" From 8c1ee8fd60db25b0faf14d1abf919b90aff5c79a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Mar 2023 15:16:13 +0000 Subject: [PATCH 053/142] Bump regex from 1.7.1 to 1.7.3 Bumps [regex](https://github.com/rust-lang/regex) from 1.7.1 to 1.7.3. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.7.1...1.7.3) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c1388e4..ff267c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -233,9 +233,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.1" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" dependencies = [ "aho-corasick", "memchr", @@ -244,9 +244,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.27" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "scopeguard" From 008cdf6be6c18406b9799af2ff6781b732ba42a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 05:58:45 +0000 Subject: [PATCH 054/142] Bump serde from 1.0.158 to 1.0.159 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.158 to 1.0.159. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.158...v1.0.159) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c1388e4..c3e27b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -256,9 +256,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.158" +version = "1.0.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9" +checksum = "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065" [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index 4910f64..cbd8bc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" -serde = "1.0.158" +serde = "1.0.159" serde_derive = "1.0.158" toml = "0.7.3" unicode-segmentation = "1.10.1" From 9bf2b6df6270a4cda16a4beb8607eee2a278fc60 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 14:28:11 +0000 Subject: [PATCH 055/142] Bump serde_derive from 1.0.158 to 1.0.159 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.158 to 1.0.159. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.158...v1.0.159) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f3d314f..5121b25 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -262,9 +262,9 @@ checksum = "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065" [[package]] name = "serde_derive" -version = "1.0.158" +version = "1.0.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" +checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index cbd8bc3..1d1577e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" serde = "1.0.159" -serde_derive = "1.0.158" +serde_derive = "1.0.159" toml = "0.7.3" unicode-segmentation = "1.10.1" [dependencies.uuid] From 79caaf55cd987c72284cf3cf026c9bfa1f76cde6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Apr 2023 15:15:45 +0000 Subject: [PATCH 056/142] Bump uuid from 1.3.0 to 1.3.1 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.3.0 to 1.3.1. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.3.0...1.3.1) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5121b25..3313664 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -339,9 +339,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "uuid" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" +checksum = "5b55a3fef2a1e3b3a00ce878640918820d3c51081576ac657d23af9fc7928fdb" dependencies = [ "getrandom", ] diff --git a/Cargo.toml b/Cargo.toml index 1d1577e..58e8001 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.159" toml = "0.7.3" unicode-segmentation = "1.10.1" [dependencies.uuid] -version = "1.3.0" +version = "1.3.1" features = [ "v4", ] \ No newline at end of file From 1c4fa16929e9a6338cb3fa5218d4607e0f070b6d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Apr 2023 05:57:43 +0000 Subject: [PATCH 057/142] Bump serde_derive from 1.0.159 to 1.0.160 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.159 to 1.0.160. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.159...v1.0.160) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3313664..0616573 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -262,9 +262,9 @@ checksum = "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065" [[package]] name = "serde_derive" -version = "1.0.159" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585" +checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 58e8001..3f29dd9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" serde = "1.0.159" -serde_derive = "1.0.159" +serde_derive = "1.0.160" toml = "0.7.3" unicode-segmentation = "1.10.1" [dependencies.uuid] From eab1ad4e215777070e15cdbbcd03251b61fe6aeb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Apr 2023 14:37:52 +0000 Subject: [PATCH 058/142] Bump serde from 1.0.159 to 1.0.160 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.159 to 1.0.160. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.159...v1.0.160) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0616573..90acd1f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -256,9 +256,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.159" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065" +checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index 3f29dd9..5f0dd95 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" -serde = "1.0.159" +serde = "1.0.160" serde_derive = "1.0.160" toml = "0.7.3" unicode-segmentation = "1.10.1" From 5765ba83a25f4d5892a0ec01c57e39f8f768775f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Apr 2023 05:57:30 +0000 Subject: [PATCH 059/142] Bump regex from 1.7.3 to 1.8.1 Bumps [regex](https://github.com/rust-lang/regex) from 1.7.3 to 1.8.1. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.7.3...1.8.1) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 90acd1f..1e84bc4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,9 +19,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.18" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" dependencies = [ "memchr", ] @@ -162,9 +162,9 @@ checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6" [[package]] name = "memchr" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" @@ -233,9 +233,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.3" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" +checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" dependencies = [ "aho-corasick", "memchr", @@ -244,9 +244,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.29" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" [[package]] name = "scopeguard" From b26c2d56a04e096843b6ef20331930b524218b50 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 May 2023 05:59:04 +0000 Subject: [PATCH 060/142] Bump uuid from 1.3.1 to 1.3.2 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.3.1 to 1.3.2. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.3.1...1.3.2) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1e84bc4..27c621c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -339,9 +339,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "uuid" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b55a3fef2a1e3b3a00ce878640918820d3c51081576ac657d23af9fc7928fdb" +checksum = "4dad5567ad0cf5b760e5665964bec1b47dfd077ba8a2544b513f3556d3d239a2" dependencies = [ "getrandom", ] diff --git a/Cargo.toml b/Cargo.toml index 5f0dd95..248c2ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.160" toml = "0.7.3" unicode-segmentation = "1.10.1" [dependencies.uuid] -version = "1.3.1" +version = "1.3.2" features = [ "v4", ] \ No newline at end of file From 981e9a403268f06d0c6514d02651adf9321b5cda Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 May 2023 05:57:07 +0000 Subject: [PATCH 061/142] Bump serde_derive from 1.0.160 to 1.0.163 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.160 to 1.0.163. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.160...v1.0.163) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 27c621c..8564ad7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -262,9 +262,9 @@ checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" [[package]] name = "serde_derive" -version = "1.0.160" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" +checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 248c2ff..7b33c6f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" serde = "1.0.160" -serde_derive = "1.0.160" +serde_derive = "1.0.163" toml = "0.7.3" unicode-segmentation = "1.10.1" [dependencies.uuid] From 7740582c9ae8af55fbeaeda2bf7c574f1685df11 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 May 2023 14:43:07 +0000 Subject: [PATCH 062/142] Bump serde from 1.0.160 to 1.0.163 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.160 to 1.0.163. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.160...v1.0.163) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8564ad7..16af8e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -256,9 +256,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.160" +version = "1.0.163" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" +checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index 7b33c6f..d887324 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" -serde = "1.0.160" +serde = "1.0.163" serde_derive = "1.0.163" toml = "0.7.3" unicode-segmentation = "1.10.1" From f533e24d03b61e1c9909c1db1f311d2c5d227b3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 May 2023 05:57:11 +0000 Subject: [PATCH 063/142] Bump uuid from 1.3.2 to 1.3.3 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.3.2 to 1.3.3. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.3.2...1.3.3) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8564ad7..f8f11b5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -339,9 +339,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "uuid" -version = "1.3.2" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dad5567ad0cf5b760e5665964bec1b47dfd077ba8a2544b513f3556d3d239a2" +checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" dependencies = [ "getrandom", ] diff --git a/Cargo.toml b/Cargo.toml index 7b33c6f..a944f7b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.163" toml = "0.7.3" unicode-segmentation = "1.10.1" [dependencies.uuid] -version = "1.3.2" +version = "1.3.3" features = [ "v4", ] \ No newline at end of file From ad48f2afa1cbb90fb306c3a0d14ae4d20f8283c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 25 May 2023 15:09:59 +0000 Subject: [PATCH 064/142] Bump toml from 0.7.3 to 0.7.4 Bumps [toml](https://github.com/toml-rs/toml) from 0.7.3 to 0.7.4. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.7.3...toml-v0.7.4) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 20 ++++++++++---------- Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 768aef0..da8d9cc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -273,9 +273,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0efd8caf556a6cebd3b285caf480045fcc1ac04f6bd786b09a6f11af30c4fcf4" +checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" dependencies = [ "serde", ] @@ -293,9 +293,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b403acf6f2bb0859c93c7f0d967cb4a75a7ac552100f9322faf64dc047669b21" +checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" dependencies = [ "serde", "serde_spanned", @@ -305,18 +305,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.7" +version = "0.19.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc18466501acd8ac6a3f615dd29a3438f8ca6bb3b19537138b3106e575621274" +checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" dependencies = [ "indexmap", "serde", @@ -354,9 +354,9 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "winnow" -version = "0.3.6" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d020b441f92996c80d94ae9166e8501e59c7bb56121189dc9eab3bd8216966" +checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 51c1170..f1097c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.7.0" regex = "1" serde = "1.0.163" serde_derive = "1.0.163" -toml = "0.7.3" +toml = "0.7.4" unicode-segmentation = "1.10.1" [dependencies.uuid] version = "1.3.3" From 2554cae348251403e910db6b05204214a3a2b2bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 May 2023 05:57:16 +0000 Subject: [PATCH 065/142] Bump regex from 1.8.1 to 1.8.3 Bumps [regex](https://github.com/rust-lang/regex) from 1.8.1 to 1.8.3. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.8.1...1.8.3) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 768aef0..81e3b5c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -233,9 +233,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.1" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" +checksum = "81ca098a9821bd52d6b24fd8b10bd081f47d39c22778cafaa75a2857a62c6390" dependencies = [ "aho-corasick", "memchr", @@ -244,9 +244,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" +checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" [[package]] name = "scopeguard" From 1a283cce35de4e4a7941f301ef59b8bda908666a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jun 2023 05:57:21 +0000 Subject: [PATCH 066/142] Bump serde from 1.0.163 to 1.0.164 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.163 to 1.0.164. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.163...v1.0.164) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b3344a8..b9d936b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -256,9 +256,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.163" +version = "1.0.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index f1097c4..d5cd41d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" -serde = "1.0.163" +serde = "1.0.164" serde_derive = "1.0.163" toml = "0.7.4" unicode-segmentation = "1.10.1" From 6b99d5c909a51de836ae8d0f41f4085cc4299475 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jun 2023 15:10:09 +0000 Subject: [PATCH 067/142] Bump serde_derive from 1.0.163 to 1.0.164 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.163 to 1.0.164. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.163...v1.0.164) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b9d936b..7f8f55d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -262,9 +262,9 @@ checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.164" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index d5cd41d..903b7f0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" serde = "1.0.164" -serde_derive = "1.0.163" +serde_derive = "1.0.164" toml = "0.7.4" unicode-segmentation = "1.10.1" [dependencies.uuid] From ef313a1308e2aeb11d319442d1a1e23c336c9d57 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Jun 2023 13:16:09 +0000 Subject: [PATCH 068/142] Bump regex from 1.8.3 to 1.8.4 Bumps [regex](https://github.com/rust-lang/regex) from 1.8.3 to 1.8.4. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.8.3...1.8.4) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7f8f55d..50e918a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -233,9 +233,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.3" +version = "1.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81ca098a9821bd52d6b24fd8b10bd081f47d39c22778cafaa75a2857a62c6390" +checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" dependencies = [ "aho-corasick", "memchr", From 1b50b92413537ea9fcd57c87db484dd91d66a315 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jun 2023 05:57:05 +0000 Subject: [PATCH 069/142] Bump uuid from 1.3.3 to 1.3.4 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.3.3 to 1.3.4. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.3.3...1.3.4) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 50e918a..cb0b9a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -339,9 +339,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "uuid" -version = "1.3.3" +version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "345444e32442451b267fc254ae85a209c64be56d2890e601a0c37ff0c3c5ecd2" +checksum = "0fa2982af2eec27de306107c027578ff7f423d65f7250e40ce0fea8f45248b81" dependencies = [ "getrandom", ] diff --git a/Cargo.toml b/Cargo.toml index 903b7f0..5d15217 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.164" toml = "0.7.4" unicode-segmentation = "1.10.1" [dependencies.uuid] -version = "1.3.3" +version = "1.3.4" features = [ "v4", ] \ No newline at end of file From 918b716148985ade4fa175e90a1d80705c416a9a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jun 2023 05:57:06 +0000 Subject: [PATCH 070/142] Bump toml from 0.7.4 to 0.7.5 Bumps [toml](https://github.com/toml-rs/toml) from 0.7.4 to 0.7.5. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.7.4...toml-v0.7.5) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 32 +++++++++++++++++++------------- Cargo.toml | 2 +- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cb0b9a1..39825e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -94,6 +94,12 @@ version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +[[package]] +name = "equivalent" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" + [[package]] name = "fxhash" version = "0.2.1" @@ -116,9 +122,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.3" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" [[package]] name = "hashers" @@ -140,11 +146,11 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" dependencies = [ - "autocfg", + "equivalent", "hashbrown", ] @@ -273,9 +279,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" dependencies = [ "serde", ] @@ -293,9 +299,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" +checksum = "1ebafdf5ad1220cb59e7d17cf4d2c72015297b75b19a10472f99b89225089240" dependencies = [ "serde", "serde_spanned", @@ -305,18 +311,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.19.10" +version = "0.19.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +checksum = "266f016b7f039eec8a1a80dfe6156b633d208b9fccca5e4db1d6775b0c4e34a7" dependencies = [ "indexmap", "serde", diff --git a/Cargo.toml b/Cargo.toml index 5d15217..81fada8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.7.0" regex = "1" serde = "1.0.164" serde_derive = "1.0.164" -toml = "0.7.4" +toml = "0.7.5" unicode-segmentation = "1.10.1" [dependencies.uuid] version = "1.3.4" From 19b277dbcb5587e1e7646b031354cf9a8342f812 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jul 2023 05:56:07 +0000 Subject: [PATCH 071/142] Bump uuid from 1.3.4 to 1.4.0 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.3.4 to 1.4.0. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.3.4...1.4.0) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 39825e8..f2c5a5d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -345,9 +345,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "uuid" -version = "1.3.4" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa2982af2eec27de306107c027578ff7f423d65f7250e40ce0fea8f45248b81" +checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" dependencies = [ "getrandom", ] diff --git a/Cargo.toml b/Cargo.toml index 81fada8..fec2f7d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.164" toml = "0.7.5" unicode-segmentation = "1.10.1" [dependencies.uuid] -version = "1.3.4" +version = "1.4.0" features = [ "v4", ] \ No newline at end of file From 27581368cf190eb94d73511d549276ef25d439a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jul 2023 05:11:40 +0000 Subject: [PATCH 072/142] Bump serde_derive from 1.0.164 to 1.0.171 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.164 to 1.0.171. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.164...v1.0.171) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f2c5a5d..75e2f9b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -199,18 +199,18 @@ checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] name = "proc-macro2" -version = "1.0.52" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" +checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.26" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" dependencies = [ "proc-macro2", ] @@ -268,9 +268,9 @@ checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" [[package]] name = "serde_derive" -version = "1.0.164" +version = "1.0.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9735b638ccc51c28bf6914d90a2e9725b377144fc612c49a611fddd1b631d68" +checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" dependencies = [ "proc-macro2", "quote", @@ -288,9 +288,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.3" +version = "2.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8234ae35e70582bfa0f1fedffa6daa248e41dd045310b19800c4a36382c8f60" +checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index fec2f7d..010ac8b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" serde = "1.0.164" -serde_derive = "1.0.164" +serde_derive = "1.0.171" toml = "0.7.5" unicode-segmentation = "1.10.1" [dependencies.uuid] From 97b3e6ae9cc5894b58279f7bc9b281f03502d221 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jul 2023 13:42:44 +0000 Subject: [PATCH 073/142] Bump toml from 0.7.5 to 0.7.6 Bumps [toml](https://github.com/toml-rs/toml) from 0.7.5 to 0.7.6. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.7.5...toml-v0.7.6) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 75e2f9b..bdd3054 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -299,9 +299,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebafdf5ad1220cb59e7d17cf4d2c72015297b75b19a10472f99b89225089240" +checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" dependencies = [ "serde", "serde_spanned", @@ -320,9 +320,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.11" +version = "0.19.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266f016b7f039eec8a1a80dfe6156b633d208b9fccca5e4db1d6775b0c4e34a7" +checksum = "c500344a19072298cd05a7224b3c0c629348b78692bf48466c5238656e315a78" dependencies = [ "indexmap", "serde", diff --git a/Cargo.toml b/Cargo.toml index 010ac8b..42a8062 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.7.0" regex = "1" serde = "1.0.164" serde_derive = "1.0.171" -toml = "0.7.5" +toml = "0.7.6" unicode-segmentation = "1.10.1" [dependencies.uuid] version = "1.4.0" From 677a858770d53ba8205338f571c0457868f20ce5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 14:28:25 +0000 Subject: [PATCH 074/142] Bump regex from 1.8.4 to 1.9.1 Bumps [regex](https://github.com/rust-lang/regex) from 1.8.4 to 1.9.1. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.8.4...1.9.1) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bdd3054..ca24eb5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -239,9 +239,21 @@ dependencies = [ [[package]] name = "regex" -version = "1.8.4" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ab3ca65655bb1e41f2a8c8cd662eb4fb035e67c3f78da1d61dffe89d07300f" +checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" dependencies = [ "aho-corasick", "memchr", @@ -250,9 +262,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "scopeguard" From 090bef97806510f4cc10160c6cceed35ecba2fde Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 05:01:02 +0000 Subject: [PATCH 075/142] Bump uuid from 1.4.0 to 1.4.1 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.4.0 to 1.4.1. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.4.0...1.4.1) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bdd3054..a246801 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -345,9 +345,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "uuid" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ "getrandom", ] diff --git a/Cargo.toml b/Cargo.toml index 42a8062..4bf8f09 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.171" toml = "0.7.6" unicode-segmentation = "1.10.1" [dependencies.uuid] -version = "1.4.0" +version = "1.4.1" features = [ "v4", ] \ No newline at end of file From 958afddb05b427eb33fd544869309bc7d8c0d675 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 15:29:02 +0000 Subject: [PATCH 076/142] Bump serde from 1.0.164 to 1.0.180 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.164 to 1.0.180. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.164...v1.0.180) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d540456..a790de4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -274,9 +274,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.164" +version = "1.0.180" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8c8cf938e98f769bc164923b06dce91cea1751522f46f8466461af04c9027d" +checksum = "0ea67f183f058fe88a4e3ec6e2788e003840893b91bac4559cabedd00863b3ed" [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index 4bf8f09..ce22590 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" -serde = "1.0.164" +serde = "1.0.180" serde_derive = "1.0.171" toml = "0.7.6" unicode-segmentation = "1.10.1" From 18cb518d0065b64a27330822673f04063384079d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 17:25:53 +0000 Subject: [PATCH 077/142] Bump serde_derive from 1.0.171 to 1.0.180 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.171 to 1.0.180. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.171...v1.0.180) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a790de4..37ce985 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -280,9 +280,9 @@ checksum = "0ea67f183f058fe88a4e3ec6e2788e003840893b91bac4559cabedd00863b3ed" [[package]] name = "serde_derive" -version = "1.0.171" +version = "1.0.180" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" +checksum = "24e744d7782b686ab3b73267ef05697159cc0e5abbed3f47f9933165e5219036" dependencies = [ "proc-macro2", "quote", @@ -300,9 +300,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.25" +version = "2.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" +checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index ce22590..ec98f9e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" serde = "1.0.180" -serde_derive = "1.0.171" +serde_derive = "1.0.180" toml = "0.7.6" unicode-segmentation = "1.10.1" [dependencies.uuid] From b28e5791265b70324b360ad0d8a1a498698d2efc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 05:38:19 +0000 Subject: [PATCH 078/142] Bump regex from 1.9.1 to 1.9.3 Bumps [regex](https://github.com/rust-lang/regex) from 1.9.1 to 1.9.3. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.9.1...1.9.3) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 37ce985..20b9b22 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -239,9 +239,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2eae68fc220f7cf2532e4494aded17545fce192d59cd996e0fe7887f4ceb575" +checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" dependencies = [ "aho-corasick", "memchr", @@ -251,9 +251,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.3" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39354c10dd07468c2e73926b23bb9c2caca74c5501e38a35da70406f1d923310" +checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" dependencies = [ "aho-corasick", "memchr", From 8059745bc45033aa7d166e138b64b601c897bc1b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 05:38:24 +0000 Subject: [PATCH 079/142] Bump serde_derive from 1.0.180 to 1.0.183 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.180 to 1.0.183. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.180...v1.0.183) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 37ce985..7e84035 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -280,9 +280,9 @@ checksum = "0ea67f183f058fe88a4e3ec6e2788e003840893b91bac4559cabedd00863b3ed" [[package]] name = "serde_derive" -version = "1.0.180" +version = "1.0.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24e744d7782b686ab3b73267ef05697159cc0e5abbed3f47f9933165e5219036" +checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index ec98f9e..4eeb2d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" serde = "1.0.180" -serde_derive = "1.0.180" +serde_derive = "1.0.183" toml = "0.7.6" unicode-segmentation = "1.10.1" [dependencies.uuid] From ff286cdceddca58953c1911b08891937e777648d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Aug 2023 13:53:21 +0000 Subject: [PATCH 080/142] Bump serde from 1.0.180 to 1.0.183 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.180 to 1.0.183. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.180...v1.0.183) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 95c2989..7ea65c6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -274,9 +274,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.180" +version = "1.0.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea67f183f058fe88a4e3ec6e2788e003840893b91bac4559cabedd00863b3ed" +checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c" [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index 4eeb2d3..fe9c071 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" -serde = "1.0.180" +serde = "1.0.183" serde_derive = "1.0.183" toml = "0.7.6" unicode-segmentation = "1.10.1" From 22f28fee03d3f21a80afa6b39fb616e510a5805f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Aug 2023 05:28:39 +0000 Subject: [PATCH 081/142] Bump serde_derive from 1.0.183 to 1.0.185 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.183 to 1.0.185. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.183...v1.0.185) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7ea65c6..efeacb2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -280,9 +280,9 @@ checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c" [[package]] name = "serde_derive" -version = "1.0.183" +version = "1.0.185" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816" +checksum = "dc59dfdcbad1437773485e0367fea4b090a2e0a16d9ffc46af47764536a298ec" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index fe9c071..324bad3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" serde = "1.0.183" -serde_derive = "1.0.183" +serde_derive = "1.0.185" toml = "0.7.6" unicode-segmentation = "1.10.1" [dependencies.uuid] From 36b12e59c54cc19796aa45de2d01d2f7de4d67e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Aug 2023 14:34:57 +0000 Subject: [PATCH 082/142] Bump serde from 1.0.183 to 1.0.185 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.183 to 1.0.185. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.183...v1.0.185) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index efeacb2..0848eb6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -274,9 +274,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.183" +version = "1.0.185" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c" +checksum = "be9b6f69f1dfd54c3b568ffa45c310d6973a5e5148fd40cf515acaf38cf5bc31" [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index 324bad3..3a590c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" -serde = "1.0.183" +serde = "1.0.185" serde_derive = "1.0.185" toml = "0.7.6" unicode-segmentation = "1.10.1" From a74f178d4427568dcf028996d74ed88772f8cefa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Aug 2023 05:07:38 +0000 Subject: [PATCH 083/142] Bump regex from 1.9.3 to 1.9.4 Bumps [regex](https://github.com/rust-lang/regex) from 1.9.3 to 1.9.4. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.9.3...1.9.4) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0848eb6..eae4e29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -239,9 +239,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.3" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" +checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" dependencies = [ "aho-corasick", "memchr", @@ -251,9 +251,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" dependencies = [ "aho-corasick", "memchr", @@ -262,9 +262,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "scopeguard" From 8dec1cadb02f545c6e161255269c67f08cd68d1f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Aug 2023 05:07:45 +0000 Subject: [PATCH 084/142] Bump serde_derive from 1.0.185 to 1.0.188 Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.185 to 1.0.188. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.185...v1.0.188) --- updated-dependencies: - dependency-name: serde_derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0848eb6..f90e044 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -280,9 +280,9 @@ checksum = "be9b6f69f1dfd54c3b568ffa45c310d6973a5e5148fd40cf515acaf38cf5bc31" [[package]] name = "serde_derive" -version = "1.0.185" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc59dfdcbad1437773485e0367fea4b090a2e0a16d9ffc46af47764536a298ec" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 3a590c4..55f784f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" serde = "1.0.185" -serde_derive = "1.0.185" +serde_derive = "1.0.188" toml = "0.7.6" unicode-segmentation = "1.10.1" [dependencies.uuid] From 520b5eec0178005394423fb49325b2ace381e8dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 05:10:34 +0000 Subject: [PATCH 085/142] Bump regex from 1.9.4 to 1.9.5 Bumps [regex](https://github.com/rust-lang/regex) from 1.9.4 to 1.9.5. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.9.4...1.9.5) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eae4e29..4827782 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -168,9 +168,9 @@ checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memoffset" @@ -239,9 +239,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ "aho-corasick", "memchr", @@ -251,9 +251,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ "aho-corasick", "memchr", From d0b63b98241434f152d0566e3f16e865625f17a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 05:23:28 +0000 Subject: [PATCH 086/142] Bump serde from 1.0.185 to 1.0.188 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.185 to 1.0.188. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.185...v1.0.188) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 7 +++++-- Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c5e5f07..fed8d9d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -274,9 +274,12 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.185" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be9b6f69f1dfd54c3b568ffa45c310d6973a5e5148fd40cf515acaf38cf5bc31" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +dependencies = [ + "serde_derive", +] [[package]] name = "serde_derive" diff --git a/Cargo.toml b/Cargo.toml index 55f784f..e0a6eff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.7.0" regex = "1" -serde = "1.0.185" +serde = "1.0.188" serde_derive = "1.0.188" toml = "0.7.6" unicode-segmentation = "1.10.1" From 2a2d21cc3f334c3d1df5653ce3ab6a87415fecc3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 14:52:21 +0000 Subject: [PATCH 087/142] Bump toml from 0.7.6 to 0.8.0 Bumps [toml](https://github.com/toml-rs/toml) from 0.7.6 to 0.8.0. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.7.6...toml-v0.8.0) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fed8d9d..f832c1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -314,9 +314,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.6" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" +checksum = "c226a7bba6d859b63c92c4b4fe69c5b6b72d0cb897dbc8e6012298e6154cb56e" dependencies = [ "serde", "serde_spanned", @@ -335,9 +335,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.12" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c500344a19072298cd05a7224b3c0c629348b78692bf48466c5238656e315a78" +checksum = "8ff63e60a958cefbb518ae1fd6566af80d9d4be430a33f3723dfc47d1d411d95" dependencies = [ "indexmap", "serde", @@ -375,9 +375,9 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "winnow" -version = "0.4.6" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index e0a6eff..18a6618 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.7.0" regex = "1" serde = "1.0.188" serde_derive = "1.0.188" -toml = "0.7.6" +toml = "0.8.0" unicode-segmentation = "1.10.1" [dependencies.uuid] version = "1.4.1" From d599a0c2fad898e65d130ac1bb991c5e369e41b3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Sep 2023 05:51:20 +0000 Subject: [PATCH 088/142] Bump rayon from 1.7.0 to 1.8.0 Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.7.0 to 1.8.0. - [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md) - [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.7.0...rayon-core-v1.8.0) --- updated-dependencies: - dependency-name: rayon dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 39 ++++----------------------------------- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f832c1b..e26f6a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,16 +44,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "crossbeam-channel" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - [[package]] name = "crossbeam-deque" version = "0.8.1" @@ -135,15 +125,6 @@ dependencies = [ "fxhash", ] -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "indexmap" version = "2.0.0" @@ -181,16 +162,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "once_cell" version = "1.13.0" @@ -217,9 +188,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ "either", "rayon-core", @@ -227,14 +198,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 18a6618..a835a70 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] hashers = "1.0.1" lazy_static = "1.4.0" -rayon = "1.7.0" +rayon = "1.8.0" regex = "1" serde = "1.0.188" serde_derive = "1.0.188" From c3296728fd7a40fa3da5bc6a682e3861aa6d1bb7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 05:34:25 +0000 Subject: [PATCH 089/142] Bump regex from 1.9.5 to 1.9.6 Bumps [regex](https://github.com/rust-lang/regex) from 1.9.5 to 1.9.6. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.9.5...1.9.6) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e26f6a5..932089a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -208,9 +208,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.5" +version = "1.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" dependencies = [ "aho-corasick", "memchr", @@ -220,9 +220,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" dependencies = [ "aho-corasick", "memchr", From d2636e59fdc082bcbcfffdfca4cb7f60d7f1bdde Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Oct 2023 05:40:18 +0000 Subject: [PATCH 090/142] Bump toml from 0.8.0 to 0.8.2 Bumps [toml](https://github.com/toml-rs/toml) from 0.8.0 to 0.8.2. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.0...toml-v0.8.2) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 932089a..2fd4126 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -283,9 +283,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c226a7bba6d859b63c92c4b4fe69c5b6b72d0cb897dbc8e6012298e6154cb56e" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" dependencies = [ "serde", "serde_spanned", @@ -304,9 +304,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff63e60a958cefbb518ae1fd6566af80d9d4be430a33f3723dfc47d1d411d95" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap", "serde", diff --git a/Cargo.toml b/Cargo.toml index a835a70..5d0b997 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.8.0" regex = "1" serde = "1.0.188" serde_derive = "1.0.188" -toml = "0.8.0" +toml = "0.8.2" unicode-segmentation = "1.10.1" [dependencies.uuid] version = "1.4.1" From 77a2e82c7bc235c556514d3af77addd7e29020a6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 05:21:06 +0000 Subject: [PATCH 091/142] Bump serde from 1.0.188 to 1.0.189 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.188 to 1.0.189. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.188...v1.0.189) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2fd4126..70afc39 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,18 +243,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 5d0b997..da08dda 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.8.0" regex = "1" -serde = "1.0.188" +serde = "1.0.189" serde_derive = "1.0.188" toml = "0.8.2" unicode-segmentation = "1.10.1" From bced6516b088d5ea55860e0968e7fc08706c521c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 14:56:17 +0000 Subject: [PATCH 092/142] Bump regex from 1.9.6 to 1.10.2 Bumps [regex](https://github.com/rust-lang/regex) from 1.9.6 to 1.10.2. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.9.6...1.10.2) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 70afc39..7396e9e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -208,9 +208,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.6" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", @@ -220,9 +220,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.9" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", @@ -231,9 +231,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.5" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "scopeguard" From 70cec30bddf6f021aac626c31c71af332fc8e2a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jan 2024 05:12:18 +0000 Subject: [PATCH 093/142] Bump serde from 1.0.189 to 1.0.195 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.189 to 1.0.195. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.189...v1.0.195) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 20 ++++++++++---------- Cargo.toml | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7396e9e..3c75237 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -170,18 +170,18 @@ checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] name = "proc-macro2" -version = "1.0.64" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" +checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.29" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -243,18 +243,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.189" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.189" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", @@ -272,9 +272,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.28" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index da08dda..d106754 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.8.0" regex = "1" -serde = "1.0.189" +serde = "1.0.195" serde_derive = "1.0.188" toml = "0.8.2" unicode-segmentation = "1.10.1" From e256d562b4fe60a3440a23830ce7eb4ed7ec9750 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 05:35:56 +0000 Subject: [PATCH 094/142] Bump uuid from 1.4.1 to 1.7.0 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.4.1 to 1.7.0. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.4.1...1.7.0) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3c75237..ddd0e4b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -329,9 +329,9 @@ checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "uuid" -version = "1.4.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" dependencies = [ "getrandom", ] diff --git a/Cargo.toml b/Cargo.toml index d106754..b6f7a11 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.188" toml = "0.8.2" unicode-segmentation = "1.10.1" [dependencies.uuid] -version = "1.4.1" +version = "1.7.0" features = [ "v4", ] \ No newline at end of file From 617cf9a4e5cf288cad1544f7e21f4d36d72ab18e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jan 2024 05:36:08 +0000 Subject: [PATCH 095/142] Bump rayon from 1.8.0 to 1.8.1 Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.8.0 to 1.8.1. - [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md) - [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.8.0...rayon-core-v1.8.1) --- updated-dependencies: - dependency-name: rayon dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3c75237..922e028 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -188,9 +188,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" +checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" dependencies = [ "either", "rayon-core", @@ -198,9 +198,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ "crossbeam-deque", "crossbeam-utils", diff --git a/Cargo.toml b/Cargo.toml index d106754..ab30aee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] hashers = "1.0.1" lazy_static = "1.4.0" -rayon = "1.8.0" +rayon = "1.8.1" regex = "1" serde = "1.0.195" serde_derive = "1.0.188" From 9afeb56e0ae99b3749d76d8c3264a2d22bc8e543 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 05:06:42 +0000 Subject: [PATCH 096/142] Bump serde from 1.0.195 to 1.0.196 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.195 to 1.0.196. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.195...v1.0.196) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 922e028..184475d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,18 +243,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index ab30aee..3b7df07 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.8.1" regex = "1" -serde = "1.0.195" +serde = "1.0.196" serde_derive = "1.0.188" toml = "0.8.2" unicode-segmentation = "1.10.1" From 416f3135e98c77a2c08cbd4fd9cc3a2f7f6e670f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jan 2024 16:08:38 +0000 Subject: [PATCH 097/142] Bump regex from 1.10.2 to 1.10.3 Bumps [regex](https://github.com/rust-lang/regex) from 1.10.2 to 1.10.3. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.10.2...1.10.3) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 184475d..14b507e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -208,9 +208,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", @@ -220,9 +220,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", From fd3229e8a10ac11a1f1cf4823c78447485cad172 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Feb 2024 14:58:16 +0000 Subject: [PATCH 098/142] Bump toml from 0.8.2 to 0.8.10 Bumps [toml](https://github.com/toml-rs/toml) from 0.8.2 to 0.8.10. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.2...toml-v0.8.10) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e03399d..e6745db 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -263,9 +263,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" dependencies = [ "serde", ] @@ -283,9 +283,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.2" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" dependencies = [ "serde", "serde_spanned", @@ -295,18 +295,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "0c9ffdf896f8daaabf9b66ba8e77ea1ed5ed0f72821b398aba62352e95062951" dependencies = [ "indexmap", "serde", diff --git a/Cargo.toml b/Cargo.toml index d52a7fa..15cf46a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.8.1" regex = "1" serde = "1.0.196" serde_derive = "1.0.188" -toml = "0.8.2" +toml = "0.8.10" unicode-segmentation = "1.10.1" [dependencies.uuid] version = "1.7.0" From ed44c20d907f581ab4fb3006508ab2b878d3cdb5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:36:52 +0000 Subject: [PATCH 099/142] Bump unicode-segmentation from 1.10.1 to 1.11.0 Bumps [unicode-segmentation](https://github.com/unicode-rs/unicode-segmentation) from 1.10.1 to 1.11.0. - [Commits](https://github.com/unicode-rs/unicode-segmentation/compare/v1.10.1...v1.11.0) --- updated-dependencies: - dependency-name: unicode-segmentation dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0cdc766..048ab76 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -323,9 +323,9 @@ checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "uuid" diff --git a/Cargo.toml b/Cargo.toml index 15cf46a..3ffc534 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ regex = "1" serde = "1.0.196" serde_derive = "1.0.188" toml = "0.8.10" -unicode-segmentation = "1.10.1" +unicode-segmentation = "1.11.0" [dependencies.uuid] version = "1.7.0" features = [ From 25ff144d0cd9967c809a4dab44c56147fdbb9343 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Feb 2024 14:51:38 +0000 Subject: [PATCH 100/142] Bump serde from 1.0.196 to 1.0.197 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.196 to 1.0.197. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.196...v1.0.197) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 048ab76..dc9a3d1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,18 +243,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 3ffc534..a2a088d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.8.1" regex = "1" -serde = "1.0.196" +serde = "1.0.197" serde_derive = "1.0.188" toml = "0.8.10" unicode-segmentation = "1.11.0" From c55b46205b7a9ec9c36a2633c4321d9ec0b16d9a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 16:38:49 +0000 Subject: [PATCH 101/142] Bump rayon from 1.8.1 to 1.9.0 Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.8.1 to 1.9.0. - [Changelog](https://github.com/rayon-rs/rayon/blob/main/RELEASES.md) - [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.8.1...rayon-core-v1.9.0) --- updated-dependencies: - dependency-name: rayon dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dc9a3d1..80d6f89 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -188,9 +188,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7237101a77a10773db45d62004a272517633fbcc3df19d96455ede1122e051" +checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" dependencies = [ "either", "rayon-core", diff --git a/Cargo.toml b/Cargo.toml index a2a088d..7ba575a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] hashers = "1.0.1" lazy_static = "1.4.0" -rayon = "1.8.1" +rayon = "1.9.0" regex = "1" serde = "1.0.197" serde_derive = "1.0.188" From 9a01a21a03570e78f9ce876d9c530319814ef2a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 05:04:21 +0000 Subject: [PATCH 102/142] Bump toml from 0.8.10 to 0.8.11 Bumps [toml](https://github.com/toml-rs/toml) from 0.8.10 to 0.8.11. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.10...toml-v0.8.11) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 80d6f89..36ac990 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -283,9 +283,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" +checksum = "af06656561d28735e9c1cd63dfd57132c8155426aa6af24f36a00a351f88c48e" dependencies = [ "serde", "serde_spanned", @@ -304,9 +304,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.4" +version = "0.22.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9ffdf896f8daaabf9b66ba8e77ea1ed5ed0f72821b398aba62352e95062951" +checksum = "18769cd1cec395d70860ceb4d932812a0b4d06b1a4bb336745a4d21b9496e992" dependencies = [ "indexmap", "serde", @@ -344,9 +344,9 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "winnow" -version = "0.5.15" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" +checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 7ba575a..c938a4e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.9.0" regex = "1" serde = "1.0.197" serde_derive = "1.0.188" -toml = "0.8.10" +toml = "0.8.11" unicode-segmentation = "1.11.0" [dependencies.uuid] version = "1.7.0" From 9d5a6fecb33a19f2526e0ca692b6bd13bafc122c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 05:35:42 +0000 Subject: [PATCH 103/142] Bump toml from 0.8.11 to 0.8.12 Bumps [toml](https://github.com/toml-rs/toml) from 0.8.11 to 0.8.12. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.11...toml-v0.8.12) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 36ac990..3c1f1a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -283,9 +283,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af06656561d28735e9c1cd63dfd57132c8155426aa6af24f36a00a351f88c48e" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ "serde", "serde_spanned", @@ -304,9 +304,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.7" +version = "0.22.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18769cd1cec395d70860ceb4d932812a0b4d06b1a4bb336745a4d21b9496e992" +checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" dependencies = [ "indexmap", "serde", diff --git a/Cargo.toml b/Cargo.toml index c938a4e..2d065aa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.9.0" regex = "1" serde = "1.0.197" serde_derive = "1.0.188" -toml = "0.8.11" +toml = "0.8.12" unicode-segmentation = "1.11.0" [dependencies.uuid] version = "1.7.0" From 08cf3f735608c87c6d55bc1f4eb24f1b7fe2edce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:24:50 +0000 Subject: [PATCH 104/142] Bump rayon from 1.9.0 to 1.10.0 Bumps [rayon](https://github.com/rayon-rs/rayon) from 1.9.0 to 1.10.0. - [Changelog](https://github.com/rayon-rs/rayon/blob/main/RELEASES.md) - [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.9.0...rayon-core-v1.10.0) --- updated-dependencies: - dependency-name: rayon dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3c1f1a1..9bdcb10 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -188,9 +188,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", diff --git a/Cargo.toml b/Cargo.toml index 2d065aa..8aa607f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] hashers = "1.0.1" lazy_static = "1.4.0" -rayon = "1.9.0" +rayon = "1.10.0" regex = "1" serde = "1.0.197" serde_derive = "1.0.188" From 005857f94108c033d5db9d78a0b9a86a6873ffb1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:24:51 +0000 Subject: [PATCH 105/142] Bump regex from 1.10.3 to 1.10.4 Bumps [regex](https://github.com/rust-lang/regex) from 1.10.3 to 1.10.4. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.10.3...1.10.4) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3c1f1a1..9faf3a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -208,9 +208,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", From 6b8d6bb7c0a03a9b1ac2934dc0de539bf9ae918a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:24:52 +0000 Subject: [PATCH 106/142] Bump uuid from 1.7.0 to 1.8.0 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.7.0 to 1.8.0. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.7.0...1.8.0) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3c1f1a1..e198bda 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -329,9 +329,9 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "uuid" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ "getrandom", ] diff --git a/Cargo.toml b/Cargo.toml index 2d065aa..3b05765 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.188" toml = "0.8.12" unicode-segmentation = "1.11.0" [dependencies.uuid] -version = "1.7.0" +version = "1.8.0" features = [ "v4", ] \ No newline at end of file From 42b46eee5b9abc6e5a9ec7a3caacb86afe1e8438 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Apr 2024 05:49:17 +0000 Subject: [PATCH 107/142] Bump serde from 1.0.197 to 1.0.198 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.197 to 1.0.198. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.198) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bf76ee1..480b152 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,18 +243,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.197" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index a9b8ef8..62298f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.10.0" regex = "1" -serde = "1.0.197" +serde = "1.0.198" serde_derive = "1.0.188" toml = "0.8.12" unicode-segmentation = "1.11.0" From b95738b198232e1018e4344ad558d34677cefb6b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 05:02:25 +0000 Subject: [PATCH 108/142] Bump serde from 1.0.198 to 1.0.199 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.198 to 1.0.199. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.198...v1.0.199) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 480b152..5436d48 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,18 +243,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.198" +version = "1.0.199" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" +checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.198" +version = "1.0.199" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" +checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 62298f5..7563e64 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.10.0" regex = "1" -serde = "1.0.198" +serde = "1.0.199" serde_derive = "1.0.188" toml = "0.8.12" unicode-segmentation = "1.11.0" From 8248f0f3ed03cdac243d6389a386dcb815c15f64 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 05:56:37 +0000 Subject: [PATCH 109/142] Bump serde from 1.0.199 to 1.0.201 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.199 to 1.0.201. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.199...v1.0.201) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5436d48..7d77b64 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,18 +243,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.199" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" +checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.199" +version = "1.0.201" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" +checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 7563e64..ef6f38c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.10.0" regex = "1" -serde = "1.0.199" +serde = "1.0.201" serde_derive = "1.0.188" toml = "0.8.12" unicode-segmentation = "1.11.0" From 9dad541440c2a02974f568a731af6cdf13158565 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 05:41:55 +0000 Subject: [PATCH 110/142] Bump toml from 0.8.12 to 0.8.13 Bumps [toml](https://github.com/toml-rs/toml) from 0.8.12 to 0.8.13. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.12...toml-v0.8.13) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7d77b64..07652d7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -263,9 +263,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] @@ -283,9 +283,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.12" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" dependencies = [ "serde", "serde_spanned", @@ -295,18 +295,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.9" +version = "0.22.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" +checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" dependencies = [ "indexmap", "serde", diff --git a/Cargo.toml b/Cargo.toml index ef6f38c..cba3278 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.10.0" regex = "1" serde = "1.0.201" serde_derive = "1.0.188" -toml = "0.8.12" +toml = "0.8.13" unicode-segmentation = "1.11.0" [dependencies.uuid] version = "1.8.0" From 3e928706a8bcfb68878145194011b27190dfd2ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 14:15:38 +0000 Subject: [PATCH 111/142] Bump serde from 1.0.201 to 1.0.202 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.201 to 1.0.202. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.201...v1.0.202) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 07652d7..955d7a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,18 +243,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.201" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" +checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.201" +version = "1.0.202" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" +checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index cba3278..94c1e01 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.10.0" regex = "1" -serde = "1.0.201" +serde = "1.0.202" serde_derive = "1.0.188" toml = "0.8.13" unicode-segmentation = "1.11.0" From 7a019600b7829d245225d2c89b232c910f0c735a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 May 2024 05:01:05 +0000 Subject: [PATCH 112/142] Bump serde from 1.0.202 to 1.0.203 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.202 to 1.0.203. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.202...v1.0.203) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 955d7a3..b51568b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,18 +243,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.202" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.202" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 94c1e01..4789400 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.4.0" rayon = "1.10.0" regex = "1" -serde = "1.0.202" +serde = "1.0.203" serde_derive = "1.0.188" toml = "0.8.13" unicode-segmentation = "1.11.0" From 082e56db96f11fb1536c0eb53f633882ccfe6ff3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 05:08:51 +0000 Subject: [PATCH 113/142] Bump toml from 0.8.13 to 0.8.14 Bumps [toml](https://github.com/toml-rs/toml) from 0.8.13 to 0.8.14. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.13...toml-v0.8.14) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b51568b..5471a9f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -283,9 +283,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.13" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e43f8cc456c9704c851ae29c67e17ef65d2c30017c17a9765b89c382dc8bba" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" dependencies = [ "serde", "serde_spanned", @@ -304,9 +304,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.13" +version = "0.22.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c127785850e8c20836d49732ae6abfa47616e60bf9d9f57c43c250361a9db96c" +checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" dependencies = [ "indexmap", "serde", diff --git a/Cargo.toml b/Cargo.toml index 4789400..1df6b12 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.10.0" regex = "1" serde = "1.0.203" serde_derive = "1.0.188" -toml = "0.8.13" +toml = "0.8.14" unicode-segmentation = "1.11.0" [dependencies.uuid] version = "1.8.0" From 88413284f100194ad7f651328920a09c8f2a5015 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:35:55 +0000 Subject: [PATCH 114/142] Bump regex from 1.10.4 to 1.10.5 Bumps [regex](https://github.com/rust-lang/regex) from 1.10.4 to 1.10.5. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.10.4...1.10.5) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5471a9f..0cda435 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -208,9 +208,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.4" +version = "1.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", From 16fd5e0815d718224389b2a3f2fc3d1b174d3b6f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 05:12:25 +0000 Subject: [PATCH 115/142] Bump lazy_static from 1.4.0 to 1.5.0 Bumps [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) from 1.4.0 to 1.5.0. - [Release notes](https://github.com/rust-lang-nursery/lazy-static.rs/releases) - [Commits](https://github.com/rust-lang-nursery/lazy-static.rs/compare/1.4.0...1.5.0) --- updated-dependencies: - dependency-name: lazy_static dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0cda435..bf8bda3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -137,9 +137,9 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" diff --git a/Cargo.toml b/Cargo.toml index 1df6b12..88efcb2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" [dependencies] hashers = "1.0.1" -lazy_static = "1.4.0" +lazy_static = "1.5.0" rayon = "1.10.0" regex = "1" serde = "1.0.203" From 4435493b45c5c1c8a7b8860dcd2163d8ee094327 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 13:31:02 +0000 Subject: [PATCH 116/142] Bump serde from 1.0.203 to 1.0.204 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.203 to 1.0.204. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.203...v1.0.204) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bf8bda3..bc2fcc4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,18 +243,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 88efcb2..3d9443f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.5.0" rayon = "1.10.0" regex = "1" -serde = "1.0.203" +serde = "1.0.204" serde_derive = "1.0.188" toml = "0.8.14" unicode-segmentation = "1.11.0" From b611be3d1558f35ab87f5a512265da22da02633c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 05:09:20 +0000 Subject: [PATCH 117/142] Bump uuid from 1.8.0 to 1.10.0 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.8.0 to 1.10.0. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.8.0...1.10.0) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bc2fcc4..3da9df2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -329,9 +329,9 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "uuid" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ "getrandom", ] diff --git a/Cargo.toml b/Cargo.toml index 3d9443f..8d8015d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.188" toml = "0.8.14" unicode-segmentation = "1.11.0" [dependencies.uuid] -version = "1.8.0" +version = "1.10.0" features = [ "v4", ] \ No newline at end of file From 2906d1ffe9e50f0009f4bf496565de89ca79c6c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 05:14:12 +0000 Subject: [PATCH 118/142] Bump toml from 0.8.14 to 0.8.15 Bumps [toml](https://github.com/toml-rs/toml) from 0.8.14 to 0.8.15. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.14...toml-v0.8.15) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3da9df2..9d571a8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -283,9 +283,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "ac2caab0bf757388c6c0ae23b3293fdb463fee59434529014f85e3263b995c28" dependencies = [ "serde", "serde_spanned", @@ -304,9 +304,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.14" +version = "0.22.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +checksum = "278f3d518e152219c994ce877758516bca5e118eaed6996192a774fb9fbf0788" dependencies = [ "indexmap", "serde", diff --git a/Cargo.toml b/Cargo.toml index 8d8015d..3516723 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.10.0" regex = "1" serde = "1.0.204" serde_derive = "1.0.188" -toml = "0.8.14" +toml = "0.8.15" unicode-segmentation = "1.11.0" [dependencies.uuid] version = "1.10.0" From 4eb81ef19d075cb30ea1406b0d1be1e4109adc55 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 05:34:58 +0000 Subject: [PATCH 119/142] Bump toml from 0.8.15 to 0.8.16 Bumps [toml](https://github.com/toml-rs/toml) from 0.8.15 to 0.8.16. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.15...toml-v0.8.16) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9d571a8..d38636f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -263,9 +263,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -283,9 +283,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac2caab0bf757388c6c0ae23b3293fdb463fee59434529014f85e3263b995c28" +checksum = "81967dd0dd2c1ab0bc3468bd7caecc32b8a4aa47d0c8c695d8c2b2108168d62c" dependencies = [ "serde", "serde_spanned", @@ -295,18 +295,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "f8fb9f64314842840f1d940ac544da178732128f1c78c21772e876579e0da1db" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.16" +version = "0.22.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "278f3d518e152219c994ce877758516bca5e118eaed6996192a774fb9fbf0788" +checksum = "8d9f8729f5aea9562aac1cc0441f5d6de3cff1ee0c5d67293eeca5eb36ee7c16" dependencies = [ "indexmap", "serde", diff --git a/Cargo.toml b/Cargo.toml index 3516723..40e519f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.10.0" regex = "1" serde = "1.0.204" serde_derive = "1.0.188" -toml = "0.8.15" +toml = "0.8.16" unicode-segmentation = "1.11.0" [dependencies.uuid] version = "1.10.0" From 25d43ecc80f1b8c085c6a8dbf8d818df125ec1cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:23:39 +0000 Subject: [PATCH 120/142] Bump regex from 1.10.5 to 1.10.6 Bumps [regex](https://github.com/rust-lang/regex) from 1.10.5 to 1.10.6. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.10.5...1.10.6) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d38636f..2787b8f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -208,9 +208,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", From 9c220646d1821c5e4629493711a5ce98bd80fc4f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:23:46 +0000 Subject: [PATCH 121/142] Bump toml from 0.8.16 to 0.8.19 Bumps [toml](https://github.com/toml-rs/toml) from 0.8.16 to 0.8.19. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.16...toml-v0.8.19) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d38636f..266b672 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -283,9 +283,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.16" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81967dd0dd2c1ab0bc3468bd7caecc32b8a4aa47d0c8c695d8c2b2108168d62c" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", @@ -295,18 +295,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8fb9f64314842840f1d940ac544da178732128f1c78c21772e876579e0da1db" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.17" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9f8729f5aea9562aac1cc0441f5d6de3cff1ee0c5d67293eeca5eb36ee7c16" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ "indexmap", "serde", @@ -344,9 +344,9 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "winnow" -version = "0.6.5" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 40e519f..697520e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.10.0" regex = "1" serde = "1.0.204" serde_derive = "1.0.188" -toml = "0.8.16" +toml = "0.8.19" unicode-segmentation = "1.11.0" [dependencies.uuid] version = "1.10.0" From f4c844d3e7687cfc8d238ad34e51629d313adb17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 05:29:16 +0000 Subject: [PATCH 122/142] Bump serde from 1.0.204 to 1.0.206 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.204 to 1.0.206. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.204...v1.0.206) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index acc364d..8a3b047 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,18 +243,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.204" +version = "1.0.206" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "5b3e4cd94123dd520a128bcd11e34d9e9e423e7e3e50425cb1b4b1e3549d0284" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.206" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "fabfb6138d2383ea8208cf98ccf69cdfb1aff4088460681d84189aa259762f97" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 697520e..937b4e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.5.0" rayon = "1.10.0" regex = "1" -serde = "1.0.204" +serde = "1.0.206" serde_derive = "1.0.188" toml = "0.8.19" unicode-segmentation = "1.11.0" From 5fe49761f7f8bce7b08efd296868b751bded8d48 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 05:08:48 +0000 Subject: [PATCH 123/142] Bump serde from 1.0.206 to 1.0.208 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.206 to 1.0.208. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.206...v1.0.208) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8a3b047..e428249 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,18 +243,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.206" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b3e4cd94123dd520a128bcd11e34d9e9e423e7e3e50425cb1b4b1e3549d0284" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.206" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabfb6138d2383ea8208cf98ccf69cdfb1aff4088460681d84189aa259762f97" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 937b4e3..0008579 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.5.0" rayon = "1.10.0" regex = "1" -serde = "1.0.206" +serde = "1.0.208" serde_derive = "1.0.188" toml = "0.8.19" unicode-segmentation = "1.11.0" From 372339cc16299046ffb672391de0a19867f8dbb8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 05:35:09 +0000 Subject: [PATCH 124/142] Bump serde from 1.0.208 to 1.0.209 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.208 to 1.0.209. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.208...v1.0.209) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e428249..981cb70 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,18 +243,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.208" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.208" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 0008579..3efde16 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.5.0" rayon = "1.10.0" regex = "1" -serde = "1.0.208" +serde = "1.0.209" serde_derive = "1.0.188" toml = "0.8.19" unicode-segmentation = "1.11.0" From 1f330d5cc1d71f532f5c38d148a1591ad8dffea8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 05:28:07 +0000 Subject: [PATCH 125/142] Bump serde from 1.0.209 to 1.0.210 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.209 to 1.0.210. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.209...v1.0.210) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 981cb70..06cf2e9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,18 +243,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 3efde16..5d128dc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.5.0" rayon = "1.10.0" regex = "1" -serde = "1.0.209" +serde = "1.0.210" serde_derive = "1.0.188" toml = "0.8.19" unicode-segmentation = "1.11.0" From 0b9c45f555b6ad231f229d211dffe58a40efba48 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 05:23:10 +0000 Subject: [PATCH 126/142] Bump unicode-segmentation from 1.11.0 to 1.12.0 Bumps [unicode-segmentation](https://github.com/unicode-rs/unicode-segmentation) from 1.11.0 to 1.12.0. - [Commits](https://github.com/unicode-rs/unicode-segmentation/compare/v1.11.0...v1.12.0) --- updated-dependencies: - dependency-name: unicode-segmentation dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 06cf2e9..a66a181 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -323,9 +323,9 @@ checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "uuid" diff --git a/Cargo.toml b/Cargo.toml index 5d128dc..054be28 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ regex = "1" serde = "1.0.210" serde_derive = "1.0.188" toml = "0.8.19" -unicode-segmentation = "1.11.0" +unicode-segmentation = "1.12.0" [dependencies.uuid] version = "1.10.0" features = [ From 0f0168fb7b3ec48d6132f96368d2f80dd4fe5773 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 05:07:58 +0000 Subject: [PATCH 127/142] Bump regex from 1.10.6 to 1.11.0 Bumps [regex](https://github.com/rust-lang/regex) from 1.10.6 to 1.11.0. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.10.6...1.11.0) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a66a181..8411015 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -208,9 +208,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.6" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", @@ -220,9 +220,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" dependencies = [ "aho-corasick", "memchr", @@ -231,9 +231,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "scopeguard" From 5e56fcce93f9c5a05c819d95f10c91afb9e66018 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 05:15:20 +0000 Subject: [PATCH 128/142] Bump uuid from 1.10.0 to 1.11.0 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.10.0 to 1.11.0. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.10.0...1.11.0) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8411015..45f559f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -329,9 +329,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", ] diff --git a/Cargo.toml b/Cargo.toml index 054be28..4f97c74 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.188" toml = "0.8.19" unicode-segmentation = "1.12.0" [dependencies.uuid] -version = "1.10.0" +version = "1.11.0" features = [ "v4", ] \ No newline at end of file From 6d1f540ea70144e151c6a8be45625afe4271b174 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 05:05:43 +0000 Subject: [PATCH 129/142] Bump regex from 1.11.0 to 1.11.1 Bumps [regex](https://github.com/rust-lang/regex) from 1.11.0 to 1.11.1. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.11.0...1.11.1) --- updated-dependencies: - dependency-name: regex dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8411015..90698ca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -208,9 +208,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", From 2be1d880fb54ccd9d8cb85f4d01ab1b7233534fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 05:57:10 +0000 Subject: [PATCH 130/142] Bump serde from 1.0.210 to 1.0.215 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.210 to 1.0.215. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.210...v1.0.215) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 45f559f..9117eb8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -170,9 +170,9 @@ checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" [[package]] name = "proc-macro2" -version = "1.0.76" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -243,18 +243,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", @@ -272,9 +272,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 4f97c74..c76e32e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.5.0" rayon = "1.10.0" regex = "1" -serde = "1.0.210" +serde = "1.0.215" serde_derive = "1.0.188" toml = "0.8.19" unicode-segmentation = "1.12.0" From 8a064e60a476aefd8ab98845fd341111c5fb4e39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 05:02:51 +0000 Subject: [PATCH 131/142] Bump serde from 1.0.215 to 1.0.216 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.215 to 1.0.216. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.215...v1.0.216) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4742419..a90d06a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,18 +243,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index c76e32e..115b78f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.5.0" rayon = "1.10.0" regex = "1" -serde = "1.0.215" +serde = "1.0.216" serde_derive = "1.0.188" toml = "0.8.19" unicode-segmentation = "1.12.0" From c5352084d7336794b6bb871cc0b4424c752cc51c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 05:37:26 +0000 Subject: [PATCH 132/142] Bump serde from 1.0.216 to 1.0.217 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.216 to 1.0.217. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.216...v1.0.217) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a90d06a..bce6913 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -243,18 +243,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 115b78f..b7a3184 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.5.0" rayon = "1.10.0" regex = "1" -serde = "1.0.216" +serde = "1.0.217" serde_derive = "1.0.188" toml = "0.8.19" unicode-segmentation = "1.12.0" From 5843fca286e979488efa2713cef8dc38d9420758 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 05:49:15 +0000 Subject: [PATCH 133/142] Bump uuid from 1.11.0 to 1.11.1 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.11.0 to 1.11.1. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.11.0...1.11.1) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a90d06a..40d80be 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -329,9 +329,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "uuid" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +checksum = "b913a3b5fe84142e269d63cc62b64319ccaf89b748fc31fe025177f767a756c4" dependencies = [ "getrandom", ] diff --git a/Cargo.toml b/Cargo.toml index 115b78f..3126a15 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.188" toml = "0.8.19" unicode-segmentation = "1.12.0" [dependencies.uuid] -version = "1.11.0" +version = "1.11.1" features = [ "v4", ] \ No newline at end of file From 05c16f346203821181c31a4859db78a1dc0f41fb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 05:08:06 +0000 Subject: [PATCH 134/142] Bump uuid from 1.11.1 to 1.12.0 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.11.1 to 1.12.0. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.11.1...1.12.0) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3c41612..79c959f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -329,9 +329,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "uuid" -version = "1.11.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b913a3b5fe84142e269d63cc62b64319ccaf89b748fc31fe025177f767a756c4" +checksum = "744018581f9a3454a9e15beb8a33b017183f1e7c0cd170232a2d1453b23a51c4" dependencies = [ "getrandom", ] diff --git a/Cargo.toml b/Cargo.toml index 90848e1..21e2e90 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.188" toml = "0.8.19" unicode-segmentation = "1.12.0" [dependencies.uuid] -version = "1.11.1" +version = "1.12.0" features = [ "v4", ] \ No newline at end of file From ac564489c166c3bc3e207b39ba8f7a92cdfdf2b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 05:34:48 +0000 Subject: [PATCH 135/142] Bump uuid from 1.12.0 to 1.12.1 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.12.0 to 1.12.1. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.12.0...1.12.1) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 79c959f..09abe28 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -329,9 +329,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "uuid" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744018581f9a3454a9e15beb8a33b017183f1e7c0cd170232a2d1453b23a51c4" +checksum = "b3758f5e68192bb96cc8f9b7e2c2cfdabb435499a28499a42f8f984092adad4b" dependencies = [ "getrandom", ] diff --git a/Cargo.toml b/Cargo.toml index 21e2e90..a846644 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.188" toml = "0.8.19" unicode-segmentation = "1.12.0" [dependencies.uuid] -version = "1.12.0" +version = "1.12.1" features = [ "v4", ] \ No newline at end of file From 7882a9a96b19e592802638520c6fcd0f343a6e92 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 05:38:29 +0000 Subject: [PATCH 136/142] Bump uuid from 1.12.1 to 1.13.1 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.12.1 to 1.13.1. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.12.1...1.13.1) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 99 +++++++++++++++++++++++++++++++++++++++++++++++++----- Cargo.toml | 2 +- 2 files changed, 92 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 09abe28..8446fd8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -32,6 +32,12 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +[[package]] +name = "bitflags" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" + [[package]] name = "byteorder" version = "1.4.2" @@ -101,13 +107,14 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.5" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" +checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" dependencies = [ "cfg-if", "libc", "wasi", + "windows-targets", ] [[package]] @@ -143,9 +150,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.97" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "memchr" @@ -329,18 +336,85 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "uuid" -version = "1.12.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3758f5e68192bb96cc8f9b7e2c2cfdabb435499a28499a42f8f984092adad4b" +checksum = "ced87ca4be083373936a67f8de945faa23b6b42384bd5b64434850802c6dccd0" dependencies = [ "getrandom", ] [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.13.3+wasi-0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +dependencies = [ + "wit-bindgen-rt", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -350,3 +424,12 @@ checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] + +[[package]] +name = "wit-bindgen-rt" +version = "0.33.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +dependencies = [ + "bitflags", +] diff --git a/Cargo.toml b/Cargo.toml index a846644..8a27b3c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.188" toml = "0.8.19" unicode-segmentation = "1.12.0" [dependencies.uuid] -version = "1.12.1" +version = "1.13.1" features = [ "v4", ] \ No newline at end of file From 77d4452531e3c6da4dfbe41ac3b72181a85625ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 14:44:07 +0000 Subject: [PATCH 137/142] Bump toml from 0.8.19 to 0.8.20 Bumps [toml](https://github.com/toml-rs/toml) from 0.8.19 to 0.8.20. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.19...toml-v0.8.20) --- updated-dependencies: - dependency-name: toml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 24 ++++++++++++------------ Cargo.toml | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8446fd8..71e42b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -119,9 +119,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "hashers" @@ -134,9 +134,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", "hashbrown", @@ -270,9 +270,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -290,9 +290,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" dependencies = [ "serde", "serde_spanned", @@ -311,9 +311,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "02a8b472d1a3d7c18e2d61a489aee3453fd9031c33e4f55bd533f4a7adca1bee" dependencies = [ "indexmap", "serde", @@ -418,9 +418,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "86e376c75f4f43f44db463cf729e0d3acbf954d13e22c51e26e4c264b4ab545f" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 8a27b3c..9b44b64 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.10.0" regex = "1" serde = "1.0.217" serde_derive = "1.0.188" -toml = "0.8.19" +toml = "0.8.20" unicode-segmentation = "1.12.0" [dependencies.uuid] version = "1.13.1" From fe0a9b660765248d251a24e05970aea5729b3ef4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 05:09:39 +0000 Subject: [PATCH 138/142] Bump uuid from 1.13.1 to 1.14.0 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.13.1 to 1.14.0. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/1.13.1...v1.14.0) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 71e42b6..ce5dcd7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -336,9 +336,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "uuid" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced87ca4be083373936a67f8de945faa23b6b42384bd5b64434850802c6dccd0" +checksum = "93d59ca99a559661b96bf898d8fce28ed87935fd2bea9f05983c1464dd6c71b1" dependencies = [ "getrandom", ] diff --git a/Cargo.toml b/Cargo.toml index 9b44b64..3cab7c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.188" toml = "0.8.20" unicode-segmentation = "1.12.0" [dependencies.uuid] -version = "1.13.1" +version = "1.14.0" features = [ "v4", ] \ No newline at end of file From 95d3f8fa97f9b3f233e3e4aad7267d26235a412a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 05:33:59 +0000 Subject: [PATCH 139/142] Bump uuid from 1.14.0 to 1.15.1 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.14.0 to 1.15.1. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/v1.14.0...v1.15.1) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ce5dcd7..5c6e055 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "advent-of-code" @@ -336,9 +336,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "uuid" -version = "1.14.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d59ca99a559661b96bf898d8fce28ed87935fd2bea9f05983c1464dd6c71b1" +checksum = "e0f540e3240398cce6128b64ba83fdbdd86129c16a3aa1a3a252efd66eb3d587" dependencies = [ "getrandom", ] diff --git a/Cargo.toml b/Cargo.toml index 3cab7c6..c01e3d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.188" toml = "0.8.20" unicode-segmentation = "1.12.0" [dependencies.uuid] -version = "1.14.0" +version = "1.15.1" features = [ "v4", ] \ No newline at end of file From 666270257ee9f7168b308dea4bb30261f0e8a072 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Mar 2025 11:40:44 +0000 Subject: [PATCH 140/142] Bump serde from 1.0.217 to 1.0.219 Bumps [serde](https://github.com/serde-rs/serde) from 1.0.217 to 1.0.219. - [Release notes](https://github.com/serde-rs/serde/releases) - [Commits](https://github.com/serde-rs/serde/compare/v1.0.217...v1.0.219) --- updated-dependencies: - dependency-name: serde dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5c6e055..d6acfd9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -250,18 +250,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.217" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.217" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index c01e3d0..19ca265 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ hashers = "1.0.1" lazy_static = "1.5.0" rayon = "1.10.0" regex = "1" -serde = "1.0.217" +serde = "1.0.219" serde_derive = "1.0.188" toml = "0.8.20" unicode-segmentation = "1.12.0" From b2b02444757542e5a76bc329c1c15f6ca7a92042 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 05:20:16 +0000 Subject: [PATCH 141/142] Bump uuid from 1.15.1 to 1.16.0 Bumps [uuid](https://github.com/uuid-rs/uuid) from 1.15.1 to 1.16.0. - [Release notes](https://github.com/uuid-rs/uuid/releases) - [Commits](https://github.com/uuid-rs/uuid/compare/v1.15.1...v1.16.0) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d6acfd9..352f56b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -336,9 +336,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "uuid" -version = "1.15.1" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f540e3240398cce6128b64ba83fdbdd86129c16a3aa1a3a252efd66eb3d587" +checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" dependencies = [ "getrandom", ] diff --git a/Cargo.toml b/Cargo.toml index 19ca265..cd54e22 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ serde_derive = "1.0.188" toml = "0.8.20" unicode-segmentation = "1.12.0" [dependencies.uuid] -version = "1.15.1" +version = "1.16.0" features = [ "v4", ] \ No newline at end of file From f7f778274a8eb421c092cbdc72029dce81747ea0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 05:42:59 +0000 Subject: [PATCH 142/142] Bump toml from 0.8.20 to 0.8.21 Bumps [toml](https://github.com/toml-rs/toml) from 0.8.20 to 0.8.21. - [Commits](https://github.com/toml-rs/toml/compare/toml-v0.8.20...toml-v0.8.21) --- updated-dependencies: - dependency-name: toml dependency-version: 0.8.21 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 23 +++++++++++++++-------- Cargo.toml | 2 +- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 352f56b..f872d87 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -290,9 +290,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" +checksum = "900f6c86a685850b1bc9f6223b20125115ee3f31e01207d81655bbcc0aea9231" dependencies = [ "serde", "serde_spanned", @@ -302,26 +302,33 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.23" +version = "0.22.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02a8b472d1a3d7c18e2d61a489aee3453fd9031c33e4f55bd533f4a7adca1bee" +checksum = "10558ed0bd2a1562e630926a2d1f0b98c827da99fabd3fe20920a59642504485" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", + "toml_write", "winnow", ] +[[package]] +name = "toml_write" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28391a4201ba7eb1984cfeb6862c0b3ea2cfe23332298967c749dddc0d6cd976" + [[package]] name = "unicode-ident" version = "1.0.1" @@ -418,9 +425,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.7.1" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86e376c75f4f43f44db463cf729e0d3acbf954d13e22c51e26e4c264b4ab545f" +checksum = "6cb8234a863ea0e8cd7284fcdd4f145233eb00fee02bbdd9861aec44e6477bc5" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index cd54e22..12b062a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rayon = "1.10.0" regex = "1" serde = "1.0.219" serde_derive = "1.0.188" -toml = "0.8.20" +toml = "0.8.21" unicode-segmentation = "1.12.0" [dependencies.uuid] version = "1.16.0"