From the lint documentation:
> If both `PartialOrd` and `Ord` are implemented, they must agree. This is commonly done by wrapping the result of `cmp` in `Some` for `partial_cmp`. Not doing this may silently introduce an error upon refactoring.
Pull-Request: #4379.
Some restricted environments lack proper random source, and `getrandom` crate
fails to compile. However, random sources is needed only for random key
generation which is not always required.
This change introduces `rand` feature flag that is gate to all the
functionality that requires `rand` crate.
This PR renames some method names that don't follow Rust naming conventions or behave differently from what the name suggests:
- Enforce "try" prefix on all methods that return `Result`.
- Enforce "encode" method name for methods that return encoded bytes.
- Enforce "to_bytes" method name for methods that return raw bytes.
- Enforce "decode" method name for methods that convert encoded key.
- Enforce "from_bytes" method name for methods that convert raw bytes.
Pull-Request: #3775.