Skip to content

Commit 73016bb

Browse files
committed
Indicate that 0.0 refers to positive 0.0
1 parent d5bb605 commit 73016bb

File tree

1 file changed

+2
-2
lines changed
  • library/core/src/convert

1 file changed

+2
-2
lines changed

library/core/src/convert/num.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ impl_from! { f32, f64, #[stable(feature = "lossless_float_conv", since = "1.6.0"
172172
#[stable(feature = "float_from_bool", since = "1.68.0")]
173173
#[rustc_const_unstable(feature = "const_num_from_num", issue = "87852")]
174174
impl const From<bool> for f32 {
175-
/// Converts `bool` to `f32` losslessly. The resulting value is `0.0` for
176-
/// `false` and `1.0` for `true` values.
175+
/// Converts `bool` to `f32` losslessly. The resulting value is positive
176+
/// `0.0` for `false` and `1.0` for `true` values.
177177
#[inline]
178178
fn from(small: bool) -> Self {
179179
small as u8 as Self

0 commit comments

Comments
 (0)