This commit is contained in:
Lokathor
2020-01-26 13:53:13 -07:00
parent 0ad90a7609
commit 180cf57ce3
3 changed files with 10 additions and 13 deletions
+3 -3
View File
@@ -8,13 +8,13 @@ cache:
cargo
rust:
- 1.38.0
- 1.36.0
- stable
matrix:
include:
- { os: osx, rust: 1.38.0 }
- { os: linux, rust: 1.38.0 }
- { os: osx, rust: 1.36.0 }
- { os: linux, rust: 1.36.0 }
- { os: linux, rust: stable }
- { os: linux, rust: nightly }
+4 -4
View File
@@ -6,13 +6,13 @@ matrix:
environment:
matrix:
- channel: 1.39.0
- channel: 1.36.0
target: i686-pc-windows-msvc
- channel: 1.39.0
- channel: 1.36.0
target: x86_64-pc-windows-msvc
- channel: 1.39.0
- channel: 1.36.0
target: i686-pc-windows-gnu
- channel: 1.39.0
- channel: 1.36.0
target: x86_64-pc-windows-gnu
install:
+3 -6
View File
@@ -31,12 +31,9 @@ macro_rules! tiny_vec {
};
($array_type:ty, $($elem:expr),*) => {
{
const INVOKED_ELEMENT_COUNT: usize = 0 $( +1 )*;
if INVOKED_ELEMENT_COUNT <= $array_type::CAPACITY {
TinyVec::<$array_type>::Inline(array_vec!($array_type, $($elem),*))
} else {
TinyVec::<$array_type>::Heap(vec!($($elem:expr),*))
}
let mut tv: TinyVec<$array_type> = Default::default();
$( tv.push($elem); )*
tv
}
};
}