clippy: Box result in RpcCustomError::SendTransactionPreflightFailure#11191
clippy: Box result in RpcCustomError::SendTransactionPreflightFailure#11191kskalski wants to merge 1 commit intoanza-xyz:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #11191 +/- ##
=======================================
Coverage 83.2% 83.2%
=======================================
Files 841 841
Lines 318322 318323 +1
=======================================
+ Hits 265020 265027 +7
+ Misses 53302 53296 -6 🚀 New features to boost your workflow:
|
|
Which errors? In the past I've boxed large errors that were within our own error enums to handle similar lints. |
10ce7c9 to
f7701e4
Compare
|
Looks like bigtable is no longer causing issues, but rpc does |
|
How about boxing the |
f7701e4 to
2db6977
Compare
|
Ah right... this is a public-facing API. But we haven't upgraded the crate since v3.1? I think this might be a semver-breaking change then. Ugh. Here's the first PR where I did something similar: #6290 And the PR where I did the boxing (which mentions the api-breaking-ness): #6293 Maybe the clippy-allow is the only way forward until the next major version. |
I think until 4.0 ships we use -beta labels, there are versions with that on https://docs.rs/solana-rpc-client-api/4.0.0-beta.1/solana_rpc_client_api/custom_error/enum.RpcCustomError.html I guess the optimal course is to do this change and BP to 4.0. Otherwise, maybe need to go back to the previous way of just masking the lint in the call sites, which were not too many. |
|
May be worth asking in Discord on the correct way to handle this. |
|
It was suggested on discord that we just allow the lint, since rpc is going to be removed anyway. I have it on another PR. |
Problem
Clippy in Rust toolchain 1.94 reports
clippy:result-large-errwarning for large error inrpccode.Summary of Changes
Box
resultfield inSendTransactionPreflightFailurevariant