Skip to content

Commit b851efb

Browse files
authored
Rollup merge of rust-lang#65048 - Kixunil:patch-1, r=KodrAus
Added doc about behavior of extend on HashMap It was unclear what the implementation does when it encounters existing keys. This change makes it clear by documenting the trait impl.
2 parents 5670c7f + 00d9db1 commit b851efb

File tree

1 file changed

+2
-0
lines changed
  • src/libstd/collections/hash

1 file changed

+2
-0
lines changed

src/libstd/collections/hash/map.rs

+2
Original file line numberDiff line numberDiff line change
@@ -2409,6 +2409,8 @@ where
24092409
}
24102410
}
24112411

2412+
/// Inserts all new key-values from the iterator and replaces values with existing
2413+
/// keys with new values returned from the iterator.
24122414
#[stable(feature = "rust1", since = "1.0.0")]
24132415
impl<K, V, S> Extend<(K, V)> for HashMap<K, V, S>
24142416
where

0 commit comments

Comments
 (0)