doc: Small rewording.
This commit is contained in:
parent
53c639184c
commit
58d3f109f8
@ -64,12 +64,12 @@
|
||||
/// println!("{}: {}", key, value);
|
||||
/// }
|
||||
///
|
||||
/// // Print 1, 2, 3
|
||||
/// // Prints 1, 2, 3
|
||||
/// for key in map.keys() {
|
||||
/// println!("{}", key);
|
||||
/// }
|
||||
///
|
||||
/// // Print `foo`, `bar`, `quux`
|
||||
/// // Prints `foo`, `bar`, `quux`
|
||||
/// for key in map.values() {
|
||||
/// println!("{}", key);
|
||||
/// }
|
||||
@ -108,7 +108,7 @@
|
||||
/// // Implement `Ord` and sort trolls by level.
|
||||
/// impl<'a> Ord for Troll<'a> {
|
||||
/// fn cmp(&self, other: &Troll) -> Ordering {
|
||||
/// // If we swap `self` and `other`, we get descended ordering.
|
||||
/// // If we swap `self` and `other`, we get descending ordering.
|
||||
/// self.level.cmp(&other.level)
|
||||
/// }
|
||||
/// }
|
||||
@ -290,7 +290,6 @@ pub fn values<'a>(&'a self) -> Values<'a, K, V> {
|
||||
}
|
||||
|
||||
/// Get a lazy iterator over the key-value pairs in the map, in ascending order.
|
||||
/// Requires that it be frozen (immutable).
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
@ -316,7 +315,6 @@ pub fn iter<'a>(&'a self) -> Entries<'a, K, V> {
|
||||
}
|
||||
|
||||
/// Get a lazy reverse iterator over the key-value pairs in the map, in descending order.
|
||||
/// Requires that it be frozen (immutable).
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
@ -972,7 +970,7 @@ fn next(&mut self) -> Option<&'a T> {
|
||||
/// // Implement `Ord` and sort trolls by level.
|
||||
/// impl<'a> Ord for Troll<'a> {
|
||||
/// fn cmp(&self, other: &Troll) -> Ordering {
|
||||
/// // If we swap `self` and `other`, we get descended ordering.
|
||||
/// // If we swap `self` and `other`, we get descending ordering.
|
||||
/// self.level.cmp(&other.level)
|
||||
/// }
|
||||
/// }
|
||||
|
Loading…
Reference in New Issue
Block a user