xrpl_hooks/
macros.rs

1/// Assumes uninitialized as initialized
2///
3/// Rust doesn't allow to use uninitialized values, but we need them to avoid
4/// memset, memcpy extra functions call in wasm binary.
5/// Use this macro every time you need a buffer.
6///
7/// # Example
8///
9/// ``` txt
10/// let mut buf: [u8; 20] = uninit_buf!();
11/// ```
12#[macro_export]
13macro_rules! uninit_buf {
14    () => {
15        unsafe { ::core::mem::MaybeUninit::uninit().assume_init() }
16    };
17}