diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-08-08 16:33:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-08 16:33:40 +0200 |
| commit | 1514bc1c6853f61da5c718d523e0faf931e4e737 (patch) | |
| tree | a48e9fc606227e0c4753a22c1ab746fd5eddf069 | |
| parent | eeacbee5804e488e3f5995be63a166df47abd9e8 (diff) | |
| parent | 916399070270b31377594d5ed9a8672cb18b939d (diff) | |
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
| -rw-r--r-- | src/libcore/num/f32.rs | 4 | ||||
| -rw-r--r-- | 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 fc2c431ca0f..8ff78166a9f 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 6bd0b6e5c7f..d45c04f45af 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 |
