mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 16:15:03 +00:00
Rollup merge of #55711 - kngwyu:btreemap-rangemut-doc, r=Mark-Simulacrum
Format BtreeMap::range_mut example Before: ![image](https://user-images.githubusercontent.com/16046705/48049184-36517780-e1e1-11e8-8da2-a3ae858d5a76.png) After: ![image](https://user-images.githubusercontent.com/16046705/48049210-45382a00-e1e1-11e8-87b3-84ae60ef798e.png)
This commit is contained in:
commit
e9bd1f21ec
@ -853,9 +853,10 @@ impl<K: Ord, V> BTreeMap<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