diff -r 7f13c9924b30 -r 14193146d8f2 src/direct_product.rs
--- a/src/direct_product.rs Tue Sep 09 08:24:27 2025 -0500
+++ b/src/direct_product.rs Fri Nov 28 11:28:01 2025 -0500
@@ -648,7 +648,7 @@
use super::Pair;
use pyo3::conversion::FromPyObject;
use pyo3::types::{PyAny, PyTuple};
- use pyo3::{Bound, IntoPyObject, PyErr, PyResult, Python};
+ use pyo3::{Borrowed, Bound, IntoPyObject, PyErr, Python};
impl<'py, A, B> IntoPyObject<'py> for Pair
where
@@ -694,13 +694,15 @@
}
*/
- impl<'py, A, B> FromPyObject<'py> for Pair
+ impl<'a, 'py, A, B> FromPyObject<'a, 'py> for Pair
where
- A: Clone + FromPyObject<'py>,
- B: Clone + FromPyObject<'py>,
+ A: Clone + FromPyObject<'a, 'py>,
+ B: Clone + FromPyObject<'a, 'py>,
{
- fn extract_bound(ob: &Bound<'py, PyAny>) -> PyResult {
- FromPyObject::extract_bound(ob).map(|(a, b)| Pair(a, b))
+ type Error = PyErr;
+
+ fn extract(ob: Borrowed<'a, 'py, PyAny>) -> Result {
+ FromPyObject::extract(ob).map(|(a, b)| Pair(a, b))
}
}
}