You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "messense (via GitHub)" <gi...@apache.org> on 2024/11/30 09:52:26 UTC
Re: [PR] feat: upgrade pyo3 to 0.23 [opendal]
messense commented on code in PR #5368:
URL: https://github.com/apache/opendal/pull/5368#discussion_r1864189683
##########
bindings/python/src/lister.rs:
##########
@@ -42,7 +42,12 @@ impl BlockingLister {
}
fn __next__(mut slf: PyRefMut<'_, Self>) -> PyResult<Option<PyObject>> {
match slf.0.next() {
- Some(Ok(entry)) => Ok(Some(Entry::new(entry).into_py(slf.py()))),
+ Some(Ok(entry)) => Ok(Some(
+ Entry::new(entry)
+ .into_pyobject(slf.py())?
+ .into_any()
+ .unbind(),
Review Comment:
I think these can be simplified a bit by using https://docs.rs/pyo3/latest/pyo3/conversion/trait.IntoPyObjectExt.html#method.into_py_any
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org