Add len_u16 and len_u8 features.

This commit is contained in:
wub
2023-09-29 09:09:07 +08:00
committed by Rhys Lloyd
parent 1bc606d8c8
commit 77041876ee
5 changed files with 27 additions and 14 deletions
+2 -1
View File
@@ -75,6 +75,7 @@ fn test_try_from_slice_error() {
}
#[test]
#[cfg(feature="len_u16")]
fn test_u16_index() {
const N: usize = 4096;
let mut vec: ArrayVec<_, N> = ArrayVec::new();
@@ -682,7 +683,7 @@ fn test_pop_at() {
#[test]
#[cfg(not(target_pointer_width = "16"))]
fn test_sizes() {
let v = ArrayVec::from([0u8; 1 << 16]);
let v = ArrayVec::from([0u8; 255]);
assert_eq!(vec![0u8; v.len()], &v[..]);
}