Fix building on Rust 1.34 with alloc feature enabled (#154)

* CI: Build Rust 1.34 with features

* Fix building on Rust 1.34 with alloc feature enabled

* CI: Fix building with features
This commit is contained in:
Mads Marquart
2021-11-09 20:25:23 +01:00
committed by GitHub
parent 5ce5c7d5ef
commit a5b61f9988
2 changed files with 11 additions and 3 deletions
+9 -1
View File
@@ -11,6 +11,7 @@ jobs:
matrix:
rust:
- 1.34.0
- 1.36.0
- stable
- beta
- nightly
@@ -25,9 +26,16 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
- name: Test on Stable/Beta
- name: Build the crate on 1.36 with features.
if: matrix.rust != '1.34.0'
uses: actions-rs/cargo@v1
with:
command: build
# Using `extern crate alloc` is only possible after 1.36
args: --features=alloc,std,grab_spare_slice
- name: Test on Stable/Beta
if: matrix.rust != '1.34.0' && matrix.rust != '1.36.0'
uses: actions-rs/cargo@v1
with:
command: test
args: --features=alloc --features=grab_spare_slice --features=rustc_1_40
+2 -2
View File
@@ -107,8 +107,8 @@ where
#[inline]
fn clone(&self) -> Self {
match self {
Self::Heap(v) => Self::Heap(v.clone()),
Self::Inline(v) => Self::Inline(v.clone()),
TinyVec::Heap(v) => TinyVec::Heap(v.clone()),
TinyVec::Inline(v) => TinyVec::Inline(v.clone()),
}
}