Skip to content

Commit 6a8a207

Browse files
committed
implement IntoPy<Py<PyTuple>> for Bound<PyTuple>
1 parent 4999d91 commit 6a8a207

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

625625
impl FusedIterator for BorrowedTupleIterator<'_, '_> {}
626626

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

0 commit comments

Comments
 (0)