From f15fa210f4d81f0b6dd0ed299c5ffb127b5444a8 Mon Sep 17 00:00:00 2001 From: Samuele Maci Date: Sat, 17 Aug 2019 14:27:20 +0200 Subject: [PATCH] Remove unnecessary trailing semicolon --- src/types/tuple.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/types/tuple.rs b/src/types/tuple.rs index 26ac3c0f..9b335873 100644 --- a/src/types/tuple.rs +++ b/src/types/tuple.rs @@ -154,7 +154,7 @@ macro_rules! tuple_conversion ({$length:expr,$(($refN:ident, $n:tt, $T:ident)),+ fn to_object(&self, py: Python) -> PyObject { unsafe { let ptr = ffi::PyTuple_New($length); - $(ffi::PyTuple_SetItem(ptr, $n, self.$n.to_object(py).into_ptr());)+; + $(ffi::PyTuple_SetItem(ptr, $n, self.$n.to_object(py).into_ptr());)+ PyObject::from_owned_ptr_or_panic(py, ptr) } } @@ -163,7 +163,7 @@ macro_rules! tuple_conversion ({$length:expr,$(($refN:ident, $n:tt, $T:ident)),+ fn into_object(self, py: Python) -> PyObject { unsafe { let ptr = ffi::PyTuple_New($length); - $(ffi::PyTuple_SetItem(ptr, $n, self.$n.into_object(py).into_ptr());)+; + $(ffi::PyTuple_SetItem(ptr, $n, self.$n.into_object(py).into_ptr());)+ PyObject::from_owned_ptr_or_panic(py, ptr) } } @@ -173,7 +173,7 @@ macro_rules! tuple_conversion ({$length:expr,$(($refN:ident, $n:tt, $T:ident)),+ fn into_py(self, py: Python) -> Py { unsafe { let ptr = ffi::PyTuple_New($length); - $(ffi::PyTuple_SetItem(ptr, $n, self.$n.into_object(py).into_ptr());)+; + $(ffi::PyTuple_SetItem(ptr, $n, self.$n.into_object(py).into_ptr());)+ Py::from_owned_ptr_or_panic(ptr) } }