Skip to content

Commit

Permalink
Fix typo in std::mem::transmute documentation
Browse files Browse the repository at this point in the history
u32::from_ge_bytes method does not exist; replace with u32::from_be_bytes
  • Loading branch information
ColoredCarrot committed Jul 16, 2020
1 parent e2e29de commit 593c7fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/intrinsics.rs
Expand Up @@ -1126,7 +1126,7 @@ extern "rust-intrinsic" {
///
/// // use `u32::from_ne_bytes` instead
/// let num = u32::from_ne_bytes(raw_bytes);
/// // or use `u32::from_le_bytes` or `u32::from_ge_bytes` to specify the endianness
/// // or use `u32::from_le_bytes` or `u32::from_be_bytes` to specify the endianness
/// let num = u32::from_le_bytes(raw_bytes);
/// assert_eq!(num, 0x12345678);
/// let num = u32::from_be_bytes(raw_bytes);
Expand Down

0 comments on commit 593c7fe

Please sign in to comment.