rust-lang / nomicon

The Dark Arts of Advanced and Unsafe Rust Programming
https://doc.rust-lang.org/nomicon/
Apache License 2.0
1.79k stars 261 forks source link

Removed unecessary #[repr(C)] attribute #284

Closed detly closed 3 years ago

detly commented 3 years ago

The #[repr(C)] attribute on the callback example is not necessary, since the type is not used from the C code.

detly commented 3 years ago

better safe than sorry, but yeah maybe it's nice to show it's not needed.

I can only tell you my opinion, but I found it confusing because it didn't relate to the context. But I see it's merged now, cheers!