rust-lang/rust — pull request #16067 by HeroesGrave (2014-07-29 04:45:28+00:00)
Title: Add min and max methods to PartialOrd

I would've also changed the `min` and `max` functions in `core::cmp`, but they were marked as stable and I wanted to check if it was okay.

The new methods return the greater/lesser of two values, and if an ordering cannot be found or the two values are equal, return the value that the method was called on (`self`).

As for the `min`/`max` methods, would it be a good idea to a) change them to use the min/max methods provided from `PartialOrd`, and b) only require `PartialOrd` rather than `Ord`. Or should they just be left alone as they are "stable".