Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on A Gentle Introduction to Rust. Parent comment
While the default is `f64`, it's only used if the type can't be inferred otherwise.
If the author had changed the `f64` in the code sample to `f32`, type inference would have made the float literal to be an `f32` to match.
That is a little complicated to explain, but the UX is such that literals generally "just work".
There are no comments on this comment yet.
While the default is `f64`, it's only used if the type can't be inferred otherwise.
If the author had changed the `f64` in the code sample to `f32`, type inference would have made the float literal to be an `f32` to match.
That is a little complicated to explain, but the UX is such that literals generally "just work".