diff --git a/src/types/dict.rs b/src/types/dict.rs index 80d2798a..0fe48662 100644 --- a/src/types/dict.rs +++ b/src/types/dict.rs @@ -626,15 +626,6 @@ impl<'py> BoundDictIterator<'py> { } } -impl<'py> IntoIterator for &'_ Bound<'py, PyDict> { - type Item = (Bound<'py, PyAny>, Bound<'py, PyAny>); - type IntoIter = BoundDictIterator<'py>; - - fn into_iter(self) -> Self::IntoIter { - self.iter() - } -} - impl<'py> IntoIterator for Bound<'py, PyDict> { type Item = (Bound<'py, PyAny>, Bound<'py, PyAny>); type IntoIter = BoundDictIterator<'py>; diff --git a/src/types/frozenset.rs b/src/types/frozenset.rs index 777abf6f..1bcdce4c 100644 --- a/src/types/frozenset.rs +++ b/src/types/frozenset.rs @@ -197,16 +197,6 @@ impl<'py> IntoIterator for Bound<'py, PyFrozenSet> { } } -impl<'py> IntoIterator for &'_ Bound<'py, PyFrozenSet> { - type Item = Bound<'py, PyAny>; - type IntoIter = BoundFrozenSetIterator<'py>; - - /// Returns an iterator of values in this set. - fn into_iter(self) -> Self::IntoIter { - BoundFrozenSetIterator::new(self.clone()) - } -} - #[cfg(Py_LIMITED_API)] mod impl_ { use super::*; diff --git a/src/types/list.rs b/src/types/list.rs index cdc39349..2ba4b10c 100644 --- a/src/types/list.rs +++ b/src/types/list.rs @@ -657,15 +657,6 @@ impl ExactSizeIterator for BoundListIterator<'_> { impl FusedIterator for BoundListIterator<'_> {} -impl<'a, 'py> IntoIterator for &'a Bound<'py, PyList> { - type Item = Bound<'py, PyAny>; - type IntoIter = BoundListIterator<'py>; - - fn into_iter(self) -> Self::IntoIter { - self.iter() - } -} - impl<'py> IntoIterator for Bound<'py, PyList> { type Item = Bound<'py, PyAny>; type IntoIter = BoundListIterator<'py>; diff --git a/src/types/set.rs b/src/types/set.rs index 3721cb27..a1ffaa3e 100644 --- a/src/types/set.rs +++ b/src/types/set.rs @@ -277,20 +277,6 @@ impl<'py> IntoIterator for Bound<'py, PySet> { } } -impl<'py> IntoIterator for &'_ Bound<'py, PySet> { - type Item = Bound<'py, PyAny>; - type IntoIter = BoundSetIterator<'py>; - - /// Returns an iterator of values in this set. - /// - /// # Panics - /// - /// If PyO3 detects that the set is mutated during iteration, it will panic. - fn into_iter(self) -> Self::IntoIter { - BoundSetIterator::new(self.clone()) - } -} - #[cfg(Py_LIMITED_API)] mod impl_ { use super::*;