Revert removing default from impl FromPyObject for &T and &mut T

This commit is contained in:
kngwyu 2018-11-29 22:43:08 +09:00
parent b8f1373bec
commit 7a83c1dc0f
1 changed files with 2 additions and 2 deletions

View File

@ -168,7 +168,7 @@ where
T: PyTryFrom, T: PyTryFrom,
{ {
#[inline] #[inline]
fn extract(ob: &'a PyObjectRef) -> PyResult<&'a T> { default fn extract(ob: &'a PyObjectRef) -> PyResult<&'a T> {
Ok(T::try_from(ob)?) Ok(T::try_from(ob)?)
} }
} }
@ -179,7 +179,7 @@ where
T: PyTryFrom, T: PyTryFrom,
{ {
#[inline] #[inline]
fn extract(ob: &'a PyObjectRef) -> PyResult<&'a mut T> { default fn extract(ob: &'a PyObjectRef) -> PyResult<&'a mut T> {
Ok(T::try_from_mut(ob)?) Ok(T::try_from_mut(ob)?)
} }
} }