nomicon icon indicating copy to clipboard operation
nomicon copied to clipboard

Use `()` instead of `[u8; 0]` in opaque type

Open thinety opened this issue 1 year ago • 0 comments

There once was a comment in the opaque structs section of the FFI chapter which explained that the empty array is used to avoid a warning around () in FFI. Since Rust 1.72, the compiler no longer warns about using () in FFI.

This PR swaps [u8; 0] for () in the example opaque structs to avoid any future confusion.

thinety avatar Jul 18 '24 18:07 thinety