diff --git a/src/types/tuple.rs b/src/types/tuple.rs index 59517c9a694..9f3bc7837e3 100644 --- a/src/types/tuple.rs +++ b/src/types/tuple.rs @@ -618,6 +618,12 @@ impl<'a, 'py> ExactSizeIterator for BorrowedTupleIterator<'a, 'py> { impl FusedIterator for BorrowedTupleIterator<'_, '_> {} +impl IntoPy> for Bound<'_, PyTuple> { + fn into_py(self, _: Python<'_>) -> Py { + self.unbind() + } +} + #[cold] fn wrong_tuple_length(t: &PyTuple, expected_length: usize) -> PyErr { let msg = format!(