1
Fork 0

Rollup merge of #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.
This commit is contained in:
Tyler Mandry 2019-10-11 15:09:44 -07:00 committed by GitHub
commit ec1d008f65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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