Skip to content

Commit 593c7fe

Browse files
Fix typo in std::mem::transmute documentation
u32::from_ge_bytes method does not exist; replace with u32::from_be_bytes
1 parent e2e29de commit 593c7fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/intrinsics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ extern "rust-intrinsic" {
11261126
///
11271127
/// // use `u32::from_ne_bytes` instead
11281128
/// let num = u32::from_ne_bytes(raw_bytes);
1129-
/// // or use `u32::from_le_bytes` or `u32::from_ge_bytes` to specify the endianness
1129+
/// // or use `u32::from_le_bytes` or `u32::from_be_bytes` to specify the endianness
11301130
/// let num = u32::from_le_bytes(raw_bytes);
11311131
/// assert_eq!(num, 0x12345678);
11321132
/// let num = u32::from_be_bytes(raw_bytes);

0 commit comments

Comments
 (0)