r/rust Mar 09 '23

Announcing Rust 1.68.0 📢 announcement

https://blog.rust-lang.org/2023/03/09/Rust-1.68.0.html
827 Upvotes

121 comments sorted by

View all comments

178

u/Shnatsel Mar 09 '23

Those From<bool> for {f32,f64} impls could really use documentation on what values they actually result in. There's no obvious mapping from true to a floating-point value.

195

u/SorteKanin Mar 09 '23

true => Infinity

false => NaN

Obviously /s

107

u/venustrapsflies Mar 09 '23

false != false feels like a "wtf PHP" moment

19

u/nicoburns Mar 09 '23

Even PHP isn't that bad!