From c851818813546991ece21b5cae316a73371b5be7 Mon Sep 17 00:00:00 2001 From: jake Date: Tue, 14 Nov 2023 20:57:41 -0700 Subject: [PATCH] remove unused macro --- src/networking/src/lib.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/networking/src/lib.rs b/src/networking/src/lib.rs index c8adde9..d62efe2 100644 --- a/src/networking/src/lib.rs +++ b/src/networking/src/lib.rs @@ -2,17 +2,3 @@ pub mod cipherkeys; pub mod serverstate; pub mod mainloop; pub mod interserver; - -// https://www.reddit.com/r/rust/comments/33xhhu/how_to_create_an_array_of_structs_that_havent/ -#[macro_export] -macro_rules! init_array( - ($ty:ty, $len:expr, $val:expr) => ( - { - let mut array: [$ty; $len] = unsafe { std::mem::uninitialized() }; - for i in array.iter_mut() { - unsafe { ::std::ptr::write(i, $val); } - } - array - } - ) -);