Rollup merge of #63366 - lzutao:fix-float-to-le-bytes-typo, r=Centril

doc: Fix typo in float from bytes methods

Thanks @That3Percent for pointing it out.
r? @Centril
This commit is contained in:
Mazdak Farrokhzad 2019-08-08 16:33:40 +02:00 committed by GitHub
commit 1514bc1c68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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