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

View File

@ -1294,7 +1294,7 @@ fn dfs<'a, K, V>(node: NodeRef<marker::Immut<'a>, K, V, marker::LeafOrInternal>)
}
#[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 @@ fn clone(&self) -> Self {
}
#[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>;