Make IntoIterator lifetime bounds of &BTreeMap match with &HashMap

This commit is contained in:
Nazım Can Altınova 2020-08-05 17:29:39 +02:00
parent 8b84156c6e
commit 62e06a4d09
No known key found for this signature in database
GPG Key ID: 722E786F0729647A
1 changed files with 2 additions and 2 deletions

View File

@ -1294,7 +1294,7 @@ impl<K: Ord, V> BTreeMap<K, V> {
}
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, K: 'a, V: 'a> IntoIterator for &'a BTreeMap<K, V> {
impl<'a, K, V> IntoIterator for &'a BTreeMap<K, V> {
type Item = (&'a K, &'a V);
type IntoIter = Iter<'a, K, V>;
@ -1363,7 +1363,7 @@ impl<K, V> Clone for Iter<'_, K, V> {
}
#[stable(feature = "rust1", since = "1.0.0")]
impl<'a, K: 'a, V: 'a> IntoIterator for &'a mut BTreeMap<K, V> {
impl<'a, K, V> IntoIterator for &'a mut BTreeMap<K, V> {
type Item = (&'a K, &'a mut V);
type IntoIter = IterMut<'a, K, V>;