From bdf09cd2c385f4e8c24e8b58c10e8a9f33514ffc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 14:00:57 +0000 Subject: [PATCH 1/2] Bump actions-rust-lang/setup-rust-toolchain from 1.3.5 to 1.17.0 Bumps [actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain) from 1.3.5 to 1.17.0. - [Release notes](https://github.com/actions-rust-lang/setup-rust-toolchain/releases) - [Changelog](https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.3.5...v1.17.0) --- updated-dependencies: - dependency-name: actions-rust-lang/setup-rust-toolchain dependency-version: 1.17.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b5ed73..8b5a4c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: persist-credentials: false - name: install Rust - uses: actions-rust-lang/setup-rust-toolchain@v1.3.5 + uses: actions-rust-lang/setup-rust-toolchain@v1.17.0 with: toolchain: ${{ matrix.version }} @@ -50,7 +50,7 @@ jobs: persist-credentials: false - name: install Rust - uses: actions-rust-lang/setup-rust-toolchain@v1.3.5 + uses: actions-rust-lang/setup-rust-toolchain@v1.17.0 with: { components: rustfmt, clippy } - name: format @@ -71,7 +71,7 @@ jobs: persist-credentials: false - name: install Rust - uses: actions-rust-lang/setup-rust-toolchain@v1.3.5 + uses: actions-rust-lang/setup-rust-toolchain@v1.17.0 with: { toolchain: nightly } - name: install cargo-hack From baf3b851af7a50d3aa1ae689b0d2dce9ca30e4da Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Wed, 5 Aug 2026 19:46:41 +0100 Subject: [PATCH 2/2] fix: restore compiler compatibility --- Cargo.toml | 4 ++++ src/array_map/iterators.rs | 1 - src/array_map/mod.rs | 43 ++++++++++++++------------------------ src/tiny_map.rs | 7 +++++++ 4 files changed, 27 insertions(+), 28 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e085f1e..e699a7e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,3 +18,7 @@ tinyvec = { version = "1.4", features = ["rustc_1_55"] } [features] default = [] alloc = ["hashbrown"] + +[dev-dependencies] +# Keep the MSRV test graph compatible with Rust 1.61. +once_cell = "=1.19.0" diff --git a/src/array_map/iterators.rs b/src/array_map/iterators.rs index 6717d64..c9d2c0b 100644 --- a/src/array_map/iterators.rs +++ b/src/array_map/iterators.rs @@ -83,7 +83,6 @@ impl Iterator for IntoIter { } #[inline] - #[must_use] fn size_hint(&self) -> (usize, Option) { (0, self.inner.size_hint().1) } diff --git a/src/array_map/mod.rs b/src/array_map/mod.rs index d5f0b5a..9016c06 100644 --- a/src/array_map/mod.rs +++ b/src/array_map/mod.rs @@ -176,18 +176,14 @@ impl ArrayMap { fn node_by_key(&self, key: &K) -> Option<&Node> { let mut current = self.root(); loop { - match current { + let val = current?; + let node = self.node_at(val).expect("Invalid node tree"); + current = match node.kv.0.partial_cmp(key) { None => return None, - Some(val) => { - let node = self.node_at(val).expect("Invalid node tree"); - current = match node.kv.0.partial_cmp(key) { - None => return None, - Some(Ordering::Equal) => return Some(node), - Some(Ordering::Less) => node.children[0], - Some(Ordering::Greater) => node.children[1], - }; - } - } + Some(Ordering::Equal) => return Some(node), + Some(Ordering::Less) => node.children[0], + Some(Ordering::Greater) => node.children[1], + }; } } @@ -196,20 +192,16 @@ impl ArrayMap { fn node_by_key_mut(&mut self, key: &K) -> Option<&mut Node> { let mut current = self.root(); loop { - match current { + let val = current?; + let node = self.node_at(val).expect("Invalid node tree"); + current = match node.kv.0.partial_cmp(key) { None => return None, - Some(val) => { - let node = self.node_at(val).expect("Invalid node tree"); - current = match node.kv.0.partial_cmp(key) { - None => return None, - Some(Ordering::Equal) => { - return Some(self.node_at_mut(val).expect("Invalid node tree")); - } - Some(Ordering::Less) => node.children[0], - Some(Ordering::Greater) => node.children[1], - }; + Some(Ordering::Equal) => { + return Some(self.node_at_mut(val).expect("Invalid node tree")); } - } + Some(Ordering::Less) => node.children[0], + Some(Ordering::Greater) => node.children[1], + }; } } @@ -433,10 +425,7 @@ impl ArrayMap { let mut last_relationship = ParentChildRelation::ChildIsRoot; let mut current: Option = self.root; loop { - let c = match current { - Some(c) => c, - None => return None, - }; + let c = current?; let cmp_node = self.node_at(c).expect(ERR_MSG); match cmp_node.kv.0.partial_cmp(key) { None => return None, diff --git a/src/tiny_map.rs b/src/tiny_map.rs index 8cacb1d..2375e91 100644 --- a/src/tiny_map.rs +++ b/src/tiny_map.rs @@ -216,6 +216,13 @@ impl TinyMap { } } +impl Default for TinyMap { + #[inline] + fn default() -> Self { + Self::new() + } +} + impl IntoIterator for TinyMap { type Item = (K, V); type IntoIter = IntoIter;