You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice that it is a really bad idea to use an empty enum as FFI type. The compiler relies on empty enums being uninhabited, so handling values of type &Empty is a huge footgun and can lead to buggy program behavior (by triggering undefined behavior).
The text was updated successfully, but these errors were encountered:
pcap_t
andpcap_dumper_t
seem to be represented by empty enums on the Rust side. According to the Rustonomicon this is a bad idea.From https://doc.rust-lang.org/nomicon/ffi.html#representing-opaque-structs:
The text was updated successfully, but these errors were encountered: