]> git.lizzy.rs Git - rust.git/commit
Replace pointer casting in hashmap_random_keys with safe code
authorBlackHoleFox <blackholefoxdev@gmail.com>
Tue, 9 Aug 2022 01:49:12 +0000 (18:49 -0700)
committerBlackHoleFox <blackholefoxdev@gmail.com>
Tue, 9 Aug 2022 01:49:17 +0000 (18:49 -0700)
commit0cf950375140ab293ad5af1e7a59556335c409da
treeede47a2e5ba76f78f91278ec327d12962dcd0424
parentf03ce30962cf1b2a5158667eabae8bf6e8d1cb03
Replace pointer casting in hashmap_random_keys with safe code

The old code was unnecessarily unsafe and relied on the layout
of tuples always being the same as an array of the same size.
library/std/src/sys/unix/rand.rs