Stream: t-lang/wg-unsafe-code-guidelines

Topic: Valid example to use read_unaligned


RalfJ (Jul 04 2019 at 07:38, on Zulip):

Wanted: A valid usage example for read_unaligned. The one we currently have creates intermediate unaligned references.
See https://github.com/rust-lang/rust/issues/62357.

Shnatsel (Jul 04 2019 at 17:33, on Zulip):

This looks valid to me, unless something subtle is going on: https://github.com/Frommi/miniz_oxide/blob/b8e17c50a5068931257e1daac61c892e44693091/miniz_oxide/src/deflate/core.rs#L319
It can be written completely safely with the same performance starting at Rust 1.34 though

RalfJ (Jul 04 2019 at 21:43, on Zulip):

ah, good point! one can use it in slices

Last update: Nov 19 2019 at 18:25UTC