Skip to content

Commit e1c42fb

Browse files
tehmattMatt Bryant
authored and
Matt Bryant
committed
chore: remove unnecessary nightly feature
`maybe_uninit_uninit_array` isn't needed anymore, since it's directly replaceable with an inline const expression.
1 parent 1d19c4f commit e1c42fb

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

msgpacker/src/lib.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#![cfg_attr(not(feature = "std"), no_std)]
2-
#![feature(
3-
iter_array_chunks,
4-
maybe_uninit_array_assume_init,
5-
maybe_uninit_uninit_array
6-
)]
2+
#![feature(iter_array_chunks, maybe_uninit_array_assume_init)]
73
#![warn(missing_docs)]
84
#![doc = include_str!("../README.md")]
95

msgpacker/src/unpack/common.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ macro_rules! array {
9797
type Error = <X as Unpackable>::Error;
9898

9999
fn unpack(mut buf: &[u8]) -> Result<(usize, Self), Self::Error> {
100-
let mut array = MaybeUninit::uninit_array();
100+
let mut array = [const { MaybeUninit::uninit() }; $n];
101101
let n =
102102
array
103103
.iter_mut()
@@ -117,7 +117,7 @@ macro_rules! array {
117117
I: IntoIterator<Item = u8>,
118118
{
119119
let mut bytes = bytes.into_iter();
120-
let mut array = MaybeUninit::uninit_array();
120+
let mut array = [const { MaybeUninit::uninit() }; $n];
121121
let n =
122122
array
123123
.iter_mut()

0 commit comments

Comments
 (0)