You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
493 B

  1. pub mod cipherkeys;
  2. pub mod serverstate;
  3. pub mod mainloop;
  4. pub mod interserver;
  5. // https://www.reddit.com/r/rust/comments/33xhhu/how_to_create_an_array_of_structs_that_havent/
  6. #[macro_export]
  7. macro_rules! init_array(
  8. ($ty:ty, $len:expr, $val:expr) => (
  9. {
  10. let mut array: [$ty; $len] = unsafe { std::mem::uninitialized() };
  11. for i in array.iter_mut() {
  12. unsafe { ::std::ptr::write(i, $val); }
  13. }
  14. array
  15. }
  16. )
  17. );