From 7cbcf128db9e29a5dc90b30658098f4553716379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oleg=20H=C3=B6fling?= Date: Sat, 16 Nov 2024 23:45:17 +0100 Subject: [PATCH] refactor: replace returning pyobject with bound<'p, pyany> in x509::certificate::parse_access_descriptions (#11968) Signed-off-by: oleg.hoefling --- src/rust/src/x509/certificate.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rust/src/x509/certificate.rs b/src/rust/src/x509/certificate.rs index 1eb8eec4ab9d..0533ea455fcf 100644 --- a/src/rust/src/x509/certificate.rs +++ b/src/rust/src/x509/certificate.rs @@ -700,19 +700,19 @@ pub(crate) fn parse_authority_key_identifier<'p>( .call1((aki.key_identifier, issuer, serial))?) } -pub(crate) fn parse_access_descriptions( - py: pyo3::Python<'_>, +pub(crate) fn parse_access_descriptions<'p>( + py: pyo3::Python<'p>, ext: &Extension<'_>, -) -> Result { +) -> CryptographyResult> { let ads = pyo3::types::PyList::empty(py); let parsed = ext.value::>()?; for access in parsed.unwrap_read().clone() { - let py_oid = oid_to_py_oid(py, &access.access_method)?.unbind(); + let py_oid = oid_to_py_oid(py, &access.access_method)?; let gn = x509::parse_general_name(py, access.access_location)?; let ad = types::ACCESS_DESCRIPTION.get(py)?.call1((py_oid, gn))?; ads.append(ad)?; } - Ok(ads.into_any().unbind()) + Ok(ads.into_any()) } fn parse_naming_authority<'p>(