Skip to content

Commit caf4164

Browse files
committed
add type annotations to doctest
1 parent 2979b0f commit caf4164

File tree

1 file changed

+1
-1
lines changed
  • src/libcollections/btree

1 file changed

+1
-1
lines changed

src/libcollections/btree/map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
763763
/// let mut map: BTreeMap<&str, i32> = ["Alice", "Bob", "Carol", "Cheryl"].iter()
764764
/// .map(|&s| (s, 0))
765765
/// .collect();
766-
/// for (_, balance) in map.range_mut((Included("B"), Excluded("Cheryl"))) {
766+
/// for (_, balance) in map.range_mut::<str, _>((Included("B"), Excluded("Cheryl"))) {
767767
/// *balance += 100;
768768
/// }
769769
/// for (name, balance) in &map {

0 commit comments

Comments
 (0)