google / comprehensive-rust

This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust.
https://google.github.io/comprehensive-rust/
Apache License 2.0
27.98k stars 1.67k forks source link

Update unsafe trait example to zerocopy version 0.8 #2434

Closed semihbkgr closed 3 weeks ago

semihbkgr commented 1 month ago

Zerocopy crate version 0.8 introduced changes to its API, which caused the example code to break. https://github.com/google/zerocopy/discussions/1680

AsBytes -> IntoBytes

mgeisler commented 1 month ago

Hi @semihbkgr, please run dprint fmt to fix the formatting (or apply it by hand from the output of the failing test). Then we can merge this!

mgeisler commented 1 month ago

Thanks for the help, this is super useful!

mgeisler commented 3 weeks ago

Now that the example uses &raw, it's breaking because the GH runners don't have the very latest stable version of Rust. That will be fixed by #2449.