add type annotations to doctest
This commit is contained in:
parent
2979b0ff78
commit
caf4164a25
@ -763,7 +763,7 @@ pub fn range<T: ?Sized, R>(&self, range: R) -> Range<K, V>
|
||||
/// let mut map: BTreeMap<&str, i32> = ["Alice", "Bob", "Carol", "Cheryl"].iter()
|
||||
/// .map(|&s| (s, 0))
|
||||
/// .collect();
|
||||
/// for (_, balance) in map.range_mut((Included("B"), Excluded("Cheryl"))) {
|
||||
/// for (_, balance) in map.range_mut::<str, _>((Included("B"), Excluded("Cheryl"))) {
|
||||
/// *balance += 100;
|
||||
/// }
|
||||
/// for (name, balance) in &map {
|
||||
|
Loading…
Reference in New Issue
Block a user