add type annotations to doctest

This commit is contained in:
djzin 2016-12-25 09:37:35 +00:00
parent 2979b0ff78
commit caf4164a25

View File

@ -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 {