Format BtreeMap::range_mut example
This commit is contained in:
parent
8aa926729e
commit
1224e0197a
@ -853,9 +853,10 @@ pub fn range<T: ?Sized, R>(&self, range: R) -> Range<K, V>
|
||||
/// ```
|
||||
/// use std::collections::BTreeMap;
|
||||
///
|
||||
/// let mut map: BTreeMap<&str, i32> = ["Alice", "Bob", "Carol", "Cheryl"].iter()
|
||||
/// .map(|&s| (s, 0))
|
||||
/// .collect();
|
||||
/// let mut map: BTreeMap<&str, i32> = ["Alice", "Bob", "Carol", "Cheryl"]
|
||||
/// .iter()
|
||||
/// .map(|&s| (s, 0))
|
||||
/// .collect();
|
||||
/// for (_, balance) in map.range_mut("B".."Cheryl") {
|
||||
/// *balance += 100;
|
||||
/// }
|
||||
|
Loading…
Reference in New Issue
Block a user