Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ndk: Implement common traits where sensible, and drop some Ord #483

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 15, 2024

  1. ndk: Implement common traits where sensible, and drop some Ord

    Provided traits in the `ndk` crate are all over the place.  Some
    pointer wrappers and regular enumerations derive `(Partial)Ord` even
    though there is no sense in using an ordering for these types.  Others
    don't derive `(Partial)Eq` and `Hash` which makes it hard to compare
    if objects are the same (by-pointer) or to store them inside i.e.
    `HashMap`.  Deriving these types follows Rust's [C-COMMON-TRAITS]
    convention.
    
    Additionally, sort `derives` by their relation, followed by sorting
    them alphabetically.
    
    [C-COMMON-TRAITS]: https://rust-lang.github.io/api-guidelines/interoperability.html#types-eagerly-implement-common-traits-c-common-traits
    MarijnS95 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    8126cf3 View commit details
    Browse the repository at this point in the history