core::iter includes min and max, so I decided to implement minmax which does 1.5 comparisons per element instead of 2 comparisons.
Here is the result: https://gist.github.com/sanxiyn/5092643 It seems to work, but I couldn't figure out how to put this in core::iter, using BaseIter<T> instead of &[T]. Any idea? Also, why can't I use < to compare Option<T> even if Option<T> implements Ord for T: Ord? Also, is there a better way to do this, other than using a state machine? _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev