From a058eb52018b5276831c4b339e73d8cb75c980cd Mon Sep 17 00:00:00 2001 From: David Hewitt <1939362+davidhewitt@users.noreply.github.com> Date: Sun, 19 Jul 2020 11:23:07 +0100 Subject: [PATCH] Remove redundant lifetimes --- src/conversion.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/conversion.rs b/src/conversion.rs index 2bf98dbe..e3629754 100644 --- a/src/conversion.rs +++ b/src/conversion.rs @@ -321,10 +321,10 @@ where /// This trait is similar to `std::convert::TryFrom` pub trait PyTryFrom<'v>: Sized + PyNativeType { /// Cast from a concrete Python object type to PyObject. - fn try_from<'b, V: Into<&'v PyAny>>(value: V) -> Result<&'v Self, PyDowncastError<'v>>; + fn try_from>(value: V) -> Result<&'v Self, PyDowncastError<'v>>; /// Cast from a concrete Python object type to PyObject. With exact type check. - fn try_from_exact<'b, V: Into<&'v PyAny>>(value: V) -> Result<&'v Self, PyDowncastError<'v>>; + fn try_from_exact>(value: V) -> Result<&'v Self, PyDowncastError<'v>>; /// Cast a PyAny to a specific type of PyObject. The caller must /// have already verified the reference is for this type. @@ -358,7 +358,7 @@ impl<'v, T> PyTryFrom<'v> for T where T: PyTypeInfo + PyNativeType, { - fn try_from<'b, V: Into<&'v PyAny>>(value: V) -> Result<&'v Self, PyDowncastError<'v>> { + fn try_from>(value: V) -> Result<&'v Self, PyDowncastError<'v>> { let value = value.into(); unsafe { if T::is_instance(value) { @@ -369,7 +369,7 @@ where } } - fn try_from_exact<'b, V: Into<&'v PyAny>>(value: V) -> Result<&'v Self, PyDowncastError<'v>> { + fn try_from_exact>(value: V) -> Result<&'v Self, PyDowncastError<'v>> { let value = value.into(); unsafe { if T::is_exact_instance(value) { @@ -390,7 +390,7 @@ impl<'v, T> PyTryFrom<'v> for PyCell where T: 'v + PyClass, { - fn try_from<'b, V: Into<&'v PyAny>>(value: V) -> Result<&'v Self, PyDowncastError<'v>> { + fn try_from>(value: V) -> Result<&'v Self, PyDowncastError<'v>> { let value = value.into(); unsafe { if T::is_instance(value) { @@ -400,7 +400,7 @@ where } } } - fn try_from_exact<'b, V: Into<&'v PyAny>>(value: V) -> Result<&'v Self, PyDowncastError<'v>> { + fn try_from_exact>(value: V) -> Result<&'v Self, PyDowncastError<'v>> { let value = value.into(); unsafe { if T::is_exact_instance(value) {