Skip to content

Commit dee64b9

Browse files
committed
fix: use const { MaybeUninit... } over uninit_array
1 parent 5296af7 commit dee64b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2222
// SOFTWARE.
2323
//
24-
#![feature(asm_const, maybe_uninit_uninit_array, maybe_uninit_array_assume_init)]
24+
#![feature(maybe_uninit_array_assume_init)]
2525
use std::collections::HashMap;
2626

2727
use const_fnv1a_hash::fnv1a_hash_str_64;
@@ -83,7 +83,7 @@ macro_rules! syscall {
8383
(@count_tts $($a:tt $even:tt)*) => { syscall!(@count_tts $($a)*) << 1 };
8484

8585
($fun:ident($($args:expr$(,)?)*)) => {{
86-
#[allow(unreachable_code, unused_unsafe, unused_mut, unused_assignments, unused_variables)]
86+
#[allow(unreachable_code, unused_unsafe, unused_mut, unused_assignments, unused_variables, static_mut_refs)]
8787
unsafe {
8888
if cfg!(feature="windows-syscall-use-linked") {
8989
$fun($($args,)*) as NTSTATUS
@@ -134,7 +134,7 @@ macro_rules! syscall {
134134
// Emits the actual syscall instruction
135135
(@emit [$($register:expr)*] $($stack:expr)*) => {{
136136
let [arg1, arg2, arg3, arg4, mut status] = {
137-
let mut data = MaybeUninit::<usize>::uninit_array::<5>();
137+
let mut data = [const { MaybeUninit::<usize>::uninit() }; 5];
138138
let mut data_len: usize = 0;
139139
// Initialize stack args if and only if they were used, thus
140140
// avoiding unnecessary register allocations

0 commit comments

Comments
 (0)