Lokathor / bytemuck

A crate for mucking around with piles of bytes
https://docs.rs/bytemuck
Apache License 2.0
697 stars 77 forks source link

Add a const zeroed() #240

Closed TyPR124 closed 4 months ago

TyPR124 commented 4 months ago

This uses the same implementation as Zeroable::zeroed, but being outside the trait it is able to be const. Adds the "const_zeroed" feature, because const mem::zeroed requires rust 1.75.0.

Import changes are due to "zeroed" previously being a private import from mem::*

Lokathor commented 4 months ago

released 1.16