remove `IntoIterator` for `&Bound`

This commit is contained in:
David Hewitt 2023-12-26 13:07:10 +00:00
parent 8a28a69c3d
commit e4fd557d2a
4 changed files with 0 additions and 42 deletions

View File

@ -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>;

View File

@ -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::*;

View File

@ -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>;

View File

@ -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::*;