allow items that implement Clone

This commit is contained in:
Paul Kernfeld
2020-05-12 14:57:38 -04:00
parent 488efd0b3e
commit 675e992741
2 changed files with 18 additions and 4 deletions
+9
View File
@@ -65,6 +65,15 @@ fn test_extend_from_slice_error() {
assert_matches!(res, Err(_));
}
#[test]
fn test_try_from_slice_error() {
use arrayvec::ArrayVec;
use std::convert::TryInto as _;
let res: Result<ArrayVec<[_; 2]>, _> = (&[1, 2, 3] as &[_]).try_into();
assert_matches!(res, Err(_));
}
#[test]
fn test_u16_index() {
const N: usize = 4096;