-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unnecessary_wraps complains about function wrapped by proc-macro #6721
Comments
See: rust-lang/rust-clippy#6721 (similar but not identical) Warp requires to return a `Result` and I don't know how to write it differently to comply with this lint.
See: rust-lang/rust-clippy#6721 (similar but not identical) Warp requires to return a `Result` and I don't know how to write it differently to comply with this lint.
This seems like an issue with the pyo3 library to me. I'm not sure it makes sense to disable the lint on any function with a proc-macro. |
Why do you say it's an issue with pyo3? |
Because it requires you to return a Result. |
Why is that a bug? Usually implementations will return something besides
`Ok(())` this just happens to be a degenerate case.
…On Thu, Feb 11, 2021 at 10:35 PM Cameron Steffen ***@***.***> wrote:
Because it requires you to return a Result.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#6721 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBC5FJDSURQPXHQDX73S6SOZVANCNFSM4XPCGIPQ>
.
--
All that is necessary for evil to succeed is for good people to do nothing.
|
I suspect the proc-macro could probably be changed to handle detect and handle a function returning either |
Lint name: unnecessary_wraps
I tried this code:
I expected to see this happen: No warning, even though it always returns
Ok(())
, the proc-macro needs it to return aResult
Instead, this happened:
Meta
Rust: 1.50.
The text was updated successfully, but these errors were encountered: