Closed
Description
Summary
In rustc v1.84 we didn't have this issue but after upgrading to 1.85, we started getting this error. Downgrading back to 1.84 seemed to fix the issue.
Reproducer
For example I tried this dummy code:
#[pyfunction]
fn sum_as_string(py: Python) -> PyResult<PyObject> {
let py_dict = PyDict::new_bound(py);
Ok(py_dict.into_py(py))
}
I expected to see no warnings or errors
Instead, this happened:
error: useless conversion to the same type: `pyo3::PyErr`
--> src/lib.rs:160:45
|
160 | fn sum_as_string(py: Python) -> PyResult<PyObject> {
| ^ help: consider removing
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Version
Additional Labels
No response