Transition to new Hash, removing IterBytes and std::to_bytes.
This commit is contained in:
parent
5444da54fd
commit
efaf4db24c
50 changed files with 286 additions and 1321 deletions
|
|
@ -38,7 +38,7 @@ order.
|
|||
Each `HashMap` instance has a random 128-bit key to use with a keyed hash,
|
||||
making the order of a set of keys in a given hash table randomized. Rust
|
||||
provides a [SipHash](https://131002.net/siphash/) implementation for any type
|
||||
implementing the `IterBytes` trait.
|
||||
implementing the `Hash` trait.
|
||||
|
||||
## Double-ended queues
|
||||
|
||||
|
|
@ -186,12 +186,12 @@ let mut calls = 0;
|
|||
let it = xs.iter().scan((), |_, x| {
|
||||
calls += 1;
|
||||
if *x < 3 { Some(x) } else { None }});
|
||||
|
||||
|
||||
// the iterator will only yield 1 and 2 before returning None
|
||||
// If we were to call it 5 times, calls would end up as 5, despite
|
||||
// only 2 values being yielded (and therefore 3 unique calls being
|
||||
// made). The fuse() adaptor can fix this.
|
||||
|
||||
|
||||
let mut it = it.fuse();
|
||||
it.next();
|
||||
it.next();
|
||||
|
|
|
|||
|
|
@ -4421,15 +4421,15 @@ msgstr ""
|
|||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "The full list of derivable traits is `Eq`, `TotalEq`, `Ord`, `TotalOrd`, "
|
||||
#| "`Encodable` `Decodable`, `Clone`, `DeepClone`, `IterBytes`, `Rand`, "
|
||||
#| "`Encodable` `Decodable`, `Clone`, `DeepClone`, `Hash`, `Rand`, "
|
||||
#| "`Zero`, and `ToStr`."
|
||||
msgid ""
|
||||
"The full list of derivable traits is `Eq`, `TotalEq`, `Ord`, `TotalOrd`, "
|
||||
"`Encodable` `Decodable`, `Clone`, `DeepClone`, `IterBytes`, `Rand`, "
|
||||
"`Encodable` `Decodable`, `Clone`, `DeepClone`, `Hash`, `Rand`, "
|
||||
"`Default`, `Zero`, and `ToStr`."
|
||||
msgstr ""
|
||||
"実装を自動的に導出可能なトレイトは、 `Eq`, `TotalEq`, `Ord`, `TotalOrd`, "
|
||||
"`Encodable` `Decodable`, `Clone`, `DeepClone`, `IterBytes`, `Rand`, `Zero`, "
|
||||
"`Encodable` `Decodable`, `Clone`, `DeepClone`, `Hash`, `Rand`, `Zero`, "
|
||||
"および `ToStr` です。."
|
||||
|
||||
#. type: Plain text
|
||||
|
|
|
|||
|
|
@ -2035,7 +2035,7 @@ Supported traits for `deriving` are:
|
|||
* Comparison traits: `Eq`, `TotalEq`, `Ord`, `TotalOrd`.
|
||||
* Serialization: `Encodable`, `Decodable`. These require `serialize`.
|
||||
* `Clone` and `DeepClone`, to perform (deep) copies.
|
||||
* `IterBytes`, to iterate over the bytes in a data type.
|
||||
* `Hash`, to iterate over the bytes in a data type.
|
||||
* `Rand`, to create a random instance of a data type.
|
||||
* `Default`, to create an empty instance of a data type.
|
||||
* `Zero`, to create an zero instance of a numeric data type.
|
||||
|
|
|
|||
|
|
@ -2525,7 +2525,7 @@ enum ABC { A, B, C }
|
|||
|
||||
The full list of derivable traits is `Eq`, `TotalEq`, `Ord`,
|
||||
`TotalOrd`, `Encodable` `Decodable`, `Clone`, `DeepClone`,
|
||||
`IterBytes`, `Rand`, `Default`, `Zero`, `FromPrimitive` and `Show`.
|
||||
`Hash`, `Rand`, `Default`, `Zero`, `FromPrimitive` and `Show`.
|
||||
|
||||
# Crates and the module system
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue