From 93497a459c20e8838eba48972dcf997e8eb6a49a Mon Sep 17 00:00:00 2001 From: victor Date: Mon, 26 Jan 2026 12:23:52 +0800 Subject: [PATCH 1/5] add set_len for Vec --- src/vec.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vec.rs b/src/vec.rs index 802b1e3..a3b8ad6 100644 --- a/src/vec.rs +++ b/src/vec.rs @@ -115,6 +115,11 @@ impl Vec { self.inner.as_mut_ptr() } + #[inline] + pub unsafe fn set_len(&mut self, new_len: usize) { + self.inner.set_len(new_len); + } + #[inline] pub fn clear(&mut self) { self.inner.clear(); From b3f7685224f6d46b7be30468e21209cd84b8bfa1 Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 27 Jan 2026 11:58:57 +0800 Subject: [PATCH 2/5] fix cargo clippy --- src/vec.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vec.rs b/src/vec.rs index a3b8ad6..fef9b78 100644 --- a/src/vec.rs +++ b/src/vec.rs @@ -115,6 +115,11 @@ impl Vec { self.inner.as_mut_ptr() } + /// # Safety + /// + /// - `new_len` must be less than or equal to [`capacity()`]. + /// + /// [`capacity()`]: Self::capacity #[inline] pub unsafe fn set_len(&mut self, new_len: usize) { self.inner.set_len(new_len); From 466f9adb7d855288b6d01879bcc82f28e8bbb3ae Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 27 Jan 2026 23:26:50 +0800 Subject: [PATCH 3/5] update macos-12 to macos-13 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42f8b5a..85e8f93 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest, macos-12] + os: [ubuntu-latest, windows-latest, macos-latest, macos-13] features: ["", "--features=no_std"] profile: ["", "--release"] From 106d3ca98529520c9e5fddee5f1b6ca0f2ab2c79 Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 27 Jan 2026 23:34:28 +0800 Subject: [PATCH 4/5] update macos-13 to macos-15-intel --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85e8f93..7be5704 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-latest, macos-13] + os: [ubuntu-latest, windows-latest, macos-latest, macos-15-intel] features: ["", "--features=no_std"] profile: ["", "--release"] From a8d89d0b23d0391f2f29e49742695095fcbf0db3 Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 27 Jan 2026 23:39:34 +0800 Subject: [PATCH 5/5] bump version --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index fc4a67a..3d041e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "alloc-checked" description = "Collections that don't panic on alloc failures" authors = ["Adam Cimarosti "] -version = "0.1.2" +version = "0.1.3" edition = "2021" repository = "https://github.com/questdb/alloc-checked" keywords = ["alloc", "collections", "no-std", "safe-allocation", "container"]