lib: remove array_chunks nightly feature
Removes the nightly `array_chunks` feature, since it is marked as unlikely to be merged. Usage is trivially refactored using iterators.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#![no_std]
|
||||
#![feature(
|
||||
asm_const,
|
||||
array_chunks,
|
||||
core_intrinsics,
|
||||
int_roundings,
|
||||
let_chains,
|
||||
|
||||
@@ -715,11 +715,10 @@ pub fn create_set_addr_space_buf(
|
||||
ip: usize,
|
||||
sp: usize,
|
||||
) -> [u8; size_of::<usize>() * 3] {
|
||||
let mut buf = [0_u8; 3 * size_of::<usize>()];
|
||||
let mut chunks = buf.array_chunks_mut::<{ size_of::<usize>() }>();
|
||||
*chunks.next().unwrap() = usize::to_ne_bytes(space);
|
||||
*chunks.next().unwrap() = usize::to_ne_bytes(sp);
|
||||
*chunks.next().unwrap() = usize::to_ne_bytes(ip);
|
||||
let mut buf = [0u8; size_of::<usize>() * 3];
|
||||
|
||||
buf.copy_from_slice([space, sp, ip].map(usize::to_ne_bytes).as_flattened());
|
||||
|
||||
buf
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#![allow(unused_variables)]
|
||||
#![feature(alloc_error_handler)]
|
||||
#![feature(allocator_api)]
|
||||
#![feature(array_chunks)]
|
||||
#![feature(asm_const)]
|
||||
#![feature(c_variadic)]
|
||||
#![feature(core_intrinsics)]
|
||||
|
||||
Reference in New Issue
Block a user