These are chat archives for rust-lang/rust

Oct 2016
Tristram Gräbener
Oct 25 2016 17:47
hello, I have a question concerning the following bit of code:
let y_min = self.nodes.iter().min_by_key(|&n|;
it wont work, as f64 has only partial order. Is the a nice way to do it? (otherwise I’ll juste use fold)
Kang Seonghoon
Oct 25 2016 17:49
probably fold is the simplest way to do that. if you do a lot of them, you can also look at ordered-float crate.
Tristram Gräbener
Oct 25 2016 17:50
thank you. fold does the job. I just wanted to be sure not to miss anything