From 916399070270b31377594d5ed9a8672cb18b939d Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Thu, 8 Aug 2019 01:53:30 +0000 Subject: [PATCH] doc: Fix typo in float from bytes methods --- src/libcore/num/f32.rs | 4 ++-- src/libcore/num/f64.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs index fc2c431ca0f9c..8ff78166a9f2d 100644 --- a/src/libcore/num/f32.rs +++ b/src/libcore/num/f32.rs @@ -536,7 +536,7 @@ impl f32 { Self::from_bits(u32::from_be_bytes(bytes)) } - /// Create a floating point value from its representation as a byte array in big endian. + /// Create a floating point value from its representation as a byte array in little endian. /// /// # Examples /// @@ -551,7 +551,7 @@ impl f32 { Self::from_bits(u32::from_le_bytes(bytes)) } - /// Create a floating point value from its representation as a byte array in big endian. + /// Create a floating point value from its representation as a byte array in native endian. /// /// As the target platform's native endianness is used, portable code /// likely wants to use [`from_be_bytes`] or [`from_le_bytes`], as diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs index 6bd0b6e5c7f77..d45c04f45afc2 100644 --- a/src/libcore/num/f64.rs +++ b/src/libcore/num/f64.rs @@ -549,7 +549,7 @@ impl f64 { Self::from_bits(u64::from_be_bytes(bytes)) } - /// Create a floating point value from its representation as a byte array in big endian. + /// Create a floating point value from its representation as a byte array in little endian. /// /// # Examples /// @@ -564,7 +564,7 @@ impl f64 { Self::from_bits(u64::from_le_bytes(bytes)) } - /// Create a floating point value from its representation as a byte array in big endian. + /// Create a floating point value from its representation as a byte array in native endian. /// /// As the target platform's native endianness is used, portable code /// likely wants to use [`from_be_bytes`] or [`from_le_bytes`], as