rust/library/core
Ariel Davis 003a636e76 Add an example for deriving PartialOrd on enums
For some reason, I always forget which variants are smaller and which
are larger when you derive PartialOrd on an enum. And the wording in the
current docs is not entirely clear to me.

So, I often end up making a small enum, deriving PartialOrd on it, and
then writing a `#[test]` with an assert that the top one is smaller than
the bottom one (or the other way around) to figure out which way the
deriving goes.

So then I figured, it would be great if the standard library docs just
had that example, so if I keep forgetting, at least I can figure it out
quickly by looking at std's docs.
2021-08-20 22:24:22 -04:00
..
benches Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
src Add an example for deriving PartialOrd on enums 2021-08-20 22:24:22 -04:00
tests move object safety test to library/core 2021-08-15 13:00:25 -04:00
Cargo.toml rfc3052: Remove authors field from Cargo manifests 2021-07-29 14:56:05 -07:00