CodeSandwich / Mocktopus

Mocking framework for Rust
MIT License
232 stars 20 forks source link

Use std::ptr::read instead of mem::zeroed to avoid UB. #50

Closed artemii235 closed 4 years ago

artemii235 commented 4 years ago

Replacing references with zeroed() lead to Illegal instruction panic on newest compilers when opt-level > 0. #49

CodeSandwich commented 4 years ago

Thank you, hopefully that's finally the right way to make that copy :D