-
Notifications
You must be signed in to change notification settings - Fork 1.1k
tonic::Result
and tonic::Status
trigger clippy::result_large_err
on rust 1.87
#2253
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
Comments
We can add this lint to codegen. I would welcome a PR. |
Have we considered extracting an inner boxed type, e.g. how |
Yeah, my suggestion above was wrong, I think you're probably right @tustvold I would accept a PR for this and I can get a patch release out. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
While testing the rust 1.87 beta toolchain, I noticed that clippy now raises warnings on any code that uses
tonic::Result
or otherwise contains atonic::Status
in itsErr
variant. Theresult_large_err
lint is enabled by default.I don't have an opinion about whether clippy's thresholds are correct; just wanted to give the tonic developers a heads-up as this will probably trigger warnings in a lot of downstream code that uses tonic.
Version
tonic v0.13.0 (also happens with tonic 0.12.3).
Description
Here's a trivial example that shows the warnings:
cargo +beta clippy
says:Or alternatively, without explicitly using
tonic::Result
but propagating the error type:The text was updated successfully, but these errors were encountered: