Skip to content

Commit 57b5232

Browse files
committed
implement IntoPy<Py<PyTuple>> for Bound<PyTuple>
1 parent a69e6ba commit 57b5232

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/types/tuple.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,12 @@ impl<'a, 'py> ExactSizeIterator for BorrowedTupleIterator<'a, 'py> {
618618

619619
impl FusedIterator for BorrowedTupleIterator<'_, '_> {}
620620

621+
impl IntoPy<Py<PyTuple>> for Bound<'_, PyTuple> {
622+
fn into_py(self, _: Python<'_>) -> Py<PyTuple> {
623+
self.unbind()
624+
}
625+
}
626+
621627
#[cold]
622628
fn wrong_tuple_length(t: &PyTuple, expected_length: usize) -> PyErr {
623629
let msg = format!(

0 commit comments

Comments
 (0)