diff --git a/src/rust/src/x509/certificate.rs b/src/rust/src/x509/certificate.rs index 4e130259e187..9a7103e0b564 100644 --- a/src/rust/src/x509/certificate.rs +++ b/src/rust/src/x509/certificate.rs @@ -609,10 +609,10 @@ pub(crate) fn parse_distribution_point_name( }) } -fn parse_distribution_point( - py: pyo3::Python<'_>, +fn parse_distribution_point<'p>( + py: pyo3::Python<'p>, dp: DistributionPoint<'_>, -) -> Result { +) -> CryptographyResult> { let (full_name, relative_name) = match dp.distribution_point { Some(data) => parse_distribution_point_name(py, data)?, None => (py.None(), py.None()), @@ -625,8 +625,7 @@ fn parse_distribution_point( }; Ok(types::DISTRIBUTION_POINT .get(py)? - .call1((full_name, relative_name, reasons, crl_issuer))? - .unbind()) + .call1((full_name, relative_name, reasons, crl_issuer))?) } pub(crate) fn parse_distribution_points<'p>(