remove `IntoIterator` for `&Bound`
This commit is contained in:
parent
8a28a69c3d
commit
e4fd557d2a
|
@ -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>;
|
||||
|
|
|
@ -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::*;
|
||||
|
|
|
@ -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>;
|
||||
|
|
|
@ -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::*;
|
||||
|
|
Loading…
Reference in New Issue