From 5d168fe78efebc0dbf86da4ae8da330818a48fd8 Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 3 Sep 2026 18:00:27 -0400 Subject: [PATCH 1/2] Fix compile for no_std users --- src/tinyvec.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tinyvec.rs b/src/tinyvec.rs index 211b795..48ef36b 100644 --- a/src/tinyvec.rs +++ b/src/tinyvec.rs @@ -707,7 +707,7 @@ impl TinyVec { if len <= A::CAPACITY { TinyVec::Inline(ArrayVec::from_array_len(A::default(), len)) } else { - TinyVec::Heap(vec![A::Item::default(); len]) + TinyVec::Heap(alloc::vec![A::Item::default(); len]) } } From f3fd1f571e4488969cfeff08d24cdb3dd3d73fb4 Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 3 Sep 2026 18:00:44 -0400 Subject: [PATCH 2/2] Add regression test for no_std users with alloc on --- .github/workflows/rust.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7fd1da7..44af3b1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -31,6 +31,10 @@ jobs: if: matrix.rust == '1.60.0' run: | cargo check --features=alloc,std,grab_spare_slice + - name: Check no_std with alloc + if: matrix.rust != '1.60.0' + run: | + cargo check --no-default-features --features=alloc,grab_spare_slice,latest_stable_rust - name: Test non nightly if: matrix.rust != '1.60.0' && matrix.rust != 'nightly' run: |