-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thing
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
LilyAcorn
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thing