You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 30, 2022. It is now read-only.
The `Index` trait is not required if we provide the `AsRef` trait. Users
can just call `as_ref()[0]` to get access to the 0th element of a `Hash`.
For times when we take a reference to the whole slice `[..]` using
`as_ref()` is capable and arguably more ergonomic.
From the `Hash` trait remove the trait bound on `Index` and its
associated traits, instead use the trait bound `AsRef` (we already have
a trait bound of `Borrow`).
Fix all uses of `foo[..]` -> `foo.as_ref()`.
0 commit comments