We can't use a derived `Hash` when we have a manual `Eq`, because we
need to uphold the invariant `a == b` → `h(a) == h(b)`. Since `Eq`
doesn't require them to be in reduced form, `Hash` also needs to be
normalized.
- The CI script now tests them all with --no-default-features.
- bigint: testing needs rand even when the main feature is disabled.
- rational: gate `FromPrimitive for Ratio<BigInt>` on having bigint.
Get the default hasher indirectly
`DefaultHasher` wasn't stable until 1.13, at which point all the other
hashers were deprecated, so it's not easy for us to name a hasher type to
use for testing. However, `RandomState` has been stable since 1.7, and it
implements `BuildHasher` that has a `Hasher` associated type.
(extends #287)
`DefaultHasher` wasn't stable until 1.13, at which point all the other
hashers were deprecated, so it's not easy for us to name a hasher type
to use for testing. However, `RandomState` has been stable since 1.7,
and it implements `BuildHasher` that has a `Hasher` associated type.
Fixes this warning:
warning: attribute must be of the form: `#[should_panic]` or `#[should_panic(expected = "error message")]`
--> rational/src/lib.rs:1051:7
|
1051 | #[should_panic = "== 0"]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: Errors in this attribute were erroneously allowed and will become a hard error in a future release.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Also update to use https instead of http. This avois mixed content
degradation on docs.rs.
The doc root URLs are correct as they are, the URL does not include the
crate name itself.