DSTify Hash
- The signature of the `*_equiv` methods of `HashMap` and similar structures
have changed, and now require one less level of indirection. Change your code
from:
```
hashmap.find_equiv(&"Hello");
hashmap.find_equiv(&&[0u8, 1, 2]);
```
to:
```
hashmap.find_equiv("Hello");
hashmap.find_equiv(&[0u8, 1, 2]);
```
- The generic parameter `T` of the `Hasher::hash<T>` method have become
`Sized?`. Downstream code must add `Sized?` to that method in their
implementations. For example:
```
impl Hasher<FnvState> for FnvHasher {
fn hash<T: Hash<FnvState>>(&self, t: &T) -> u64 { /* .. */ }
}
```
must be changed to:
```
impl Hasher<FnvState> for FnvHasher {
fn hash<Sized? T: Hash<FnvState>>(&self, t: &T) -> u64 { /* .. */ }
// ^^^^^^
}
```
[breaking-change]
This commit is contained in:
@@ -2123,7 +2123,7 @@ impl<'a> fmt::Show for Sidebar<'a> {
|
||||
|
||||
fn block(w: &mut fmt::Formatter, short: &str, longty: &str,
|
||||
cur: &clean::Item, cx: &Context) -> fmt::Result {
|
||||
let items = match cx.sidebar.find_equiv(&short) {
|
||||
let items = match cx.sidebar.find_equiv(short) {
|
||||
Some(items) => items.as_slice(),
|
||||
None => return Ok(())
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user