add #[must_use] to functions of slice and its iterators.

This commit is contained in:
Jendrik 2022-03-26 10:24:25 +01:00
parent dcdde01aa3
commit 5f88c23c39

View File

@ -2344,7 +2344,7 @@ fn slice_rsplit_array_mut() {
fn slice_split_array_ref_out_of_bounds() {
let v = &[1, 2, 3, 4, 5, 6][..];
v.split_array_ref::<7>();
let _ = v.split_array_ref::<7>();
}
#[should_panic]
@ -2352,7 +2352,7 @@ fn slice_split_array_ref_out_of_bounds() {
fn slice_split_array_mut_out_of_bounds() {
let v = &mut [1, 2, 3, 4, 5, 6][..];
v.split_array_mut::<7>();
let _ = v.split_array_mut::<7>();
}
#[should_panic]
@ -2360,7 +2360,7 @@ fn slice_split_array_mut_out_of_bounds() {
fn slice_rsplit_array_ref_out_of_bounds() {
let v = &[1, 2, 3, 4, 5, 6][..];
v.rsplit_array_ref::<7>();
let _ = v.rsplit_array_ref::<7>();
}
#[should_panic]
@ -2368,7 +2368,7 @@ fn slice_rsplit_array_ref_out_of_bounds() {
fn slice_rsplit_array_mut_out_of_bounds() {
let v = &mut [1, 2, 3, 4, 5, 6][..];
v.rsplit_array_mut::<7>();
let _ = v.rsplit_array_mut::<7>();
}
macro_rules! take_tests {