Skip to content

Commit 4cf58c8

Browse files
committed
implement IntoPy<Py<PyTuple>> for Bound<PyTuple>
1 parent 823b5fe commit 4cf58c8

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
@@ -622,6 +622,12 @@ impl<'a, 'py> ExactSizeIterator for BorrowedTupleIterator<'a, 'py> {
622622

623623
impl FusedIterator for BorrowedTupleIterator<'_, '_> {}
624624

625+
impl IntoPy<Py<PyTuple>> for Bound<'_, PyTuple> {
626+
fn into_py(self, _: Python<'_>) -> Py<PyTuple> {
627+
self.unbind()
628+
}
629+
}
630+
625631
#[cold]
626632
fn wrong_tuple_length(t: &PyTuple, expected_length: usize) -> PyErr {
627633
let msg = format!(

0 commit comments

Comments
 (0)