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: | 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]) } }