cmp_by_derive 0.1.0

Derive macro CmpBy and HashBy, respectively deriving traits `Ord`, `PartialOrd`, `Eq` and `PartialEq`, and `Hash` for structs and enums that can't automatically derive from those traits.
Documentation
1
2
3
4
5
6
7
fn main() {
    // Enable "nightly" cfg if the current compiler is nightly.
    // Spans in nightly are different, so we must be able to check this in UI tests
    if rustc_version::version_meta().unwrap().channel == rustc_version::Channel::Nightly {
        println!("cargo:rustc-cfg=nightly");
    }
}