clippy: Raises result_large_err to squelch lint#6290
clippy: Raises result_large_err to squelch lint#6290brooksprumo wants to merge 1 commit intoanza-xyz:masterfrom
Conversation
There was a problem hiding this comment.
note: I've tried adding #[allow(clippy::result_large_err)] in several different places before. #5990
I don’t have a preference for any particular solution. just wanted to bring something up: we will allow all new large Result types under 265 bytes if we use this PR.
|
I implemented boxing the
So, for agave v2.x, I think the only option we have is to bump the threshold. |
|
i'd prefer the explicit allows in offending call sites personally |
|
Closing. Now that we're on v3.0, we can make API-breaking changes. As such, a real fix (not changing the lint limit) is preferred. |
Problem
Upgrading Rust to 1.87.01 is blocked on a new clippy lint2,
result_large_err3.Summary of Changes
Raise the threshold for the lint to 265, since the largest size today is 264 bytes.
A subsequent PR can fix the underlying Error type to box the large variant, and remove the custom threshold.
By raising the threshold here, we unblock upgrading Rust, and we don't change any behavior.
Note that annotating the Error enums with
#[allow(clippy::result_large_err)]does not squelch the lint unfortunately.Fixes #6278
Footnotes
https://github.com/anza-xyz/agave/issues/6279 ↩
https://github.com/anza-xyz/agave/issues/6278 ↩
https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err ↩