]> git.lizzy.rs Git - rust.git/commit
Add example in the alternative in std::mem::transmute docs
authorhuangjiahua <jiahua.h@outlook.com>
Sat, 18 Apr 2020 06:58:38 +0000 (14:58 +0800)
committerhuangjiahua <jiahua.h@outlook.com>
Sat, 18 Apr 2020 06:58:38 +0000 (14:58 +0800)
commit1a1863b815d0db6aa1751e88e7044e9e2f02ac51
treed1fceb8380c43ee54f721a0b694479f83faffcf8
parent4e4d49d60fd696c4036d438292673a2d7fd34519
Add example in the alternative in std::mem::transmute docs

It is safer to use `from_ne_bytes` to convert raw bytes to type like u32.
src/libcore/intrinsics.rs