Hands-on Rust: usage of std::f32::MAX for 'unreachable'

Title: Hands-On Rust (Chapter 11)

When I reached the code *dist < &​std​::​f32​::MAX, I had to stop a second to remember what that was about.

I changed my code to add

const UNREACHABLE: i32 = std::i32::MAX;

and could then change the expression to *dist != &UNREACHABLE. (I know you don’t generally use == or != with floats, but I think it works here (guess I’ll find out)