Fix all the lint warnings on 0.32.x branch#5282
Fix all the lint warnings on 0.32.x branch#5282apoelstra merged 12 commits intorust-bitcoin:0.32.xfrom
Conversation
There are lint errors "hiding a lifetime that's elided elsewhere is confusing". Fix them.
Pull Request Test Coverage Report for Build 19517889972Details
💛 - Coveralls |
|
I grouped all of the similar lints together. This was a lot easier with jj than it would have been with just git. Clippy gives you a couple of random lint errors, you fix them and then get another random set - rinse and repeat. Then at the end CI says there are doc issues. |
There are a lint errors "the following explicit lifetimes could be elided: 'a". Fix them.
There is a lint error that "current MSRV (Minimum Supported Rust Version) is `1.56.1` but this item is stable in a `const` context since `1.64.0`". Allow it.
Some cases of incorrect doc levels e.g. module level docs used a `///` and the macro had `//`. Fix them so they are `//!` for modules `///` for items and `//` for comments. Also use the full word `implements` instead of an abbreviation to match other macros.
Lint error "non-canonical implementation of `partial_cmp` on an `Ord` type". Fix it.
There are multiple fn that return large error types and cause a Clippy error "the `Err`-variant returned from this function is very large". Allow it for the whole psbt module.
Run cargo fmt on nightly-2025-09-26 to match the current version used on master.
a8d7053 to
daad815
Compare
chuckle, yep sometimes the tools get in the way of the task. If I was better I'd put effort into |
|
nit: I dunno if this is a backport. Its 'fix all the lint warnings on 0.32.x branch', right? I guess many of the same changes are also on master, so it doesn't really matter. |
|
Thanks for doing this BTW, while reviewing I thought to myself "glad I didn't do this it would have annoyed me because I've fixed many of the things before" |
Yeah I wasn't sure, I added it to make it clear the target branch was 0.32.x and not master. I have changed it to your suggestion. |
|
In daad815 So, this "broken links" thing is what |
daad815 to
9e875ab
Compare
|
I removed |
| /// For [`crate::Transaction`], which has a locktime field, we implement a total ordering to make | ||
| /// it easy to store transactions in sorted data structures, and use the locktime's 32-bit integer | ||
| /// consensus encoding to order it. We also implement [`ordered::ArbitraryOrd`] if the "ordered" | ||
| /// consensus encoding to order it. We also implement [`ordered::ArbitraryOrd`](https://docs.rs/ordered/latest/ordered/trait.ArbitraryOrd.html) if the "ordered" |
There was a problem hiding this comment.
This line is too long. Can we use the style where at the bottom of the block of docs put
///
/// [`ordered::ArbitraryOrd`]: <https://docs.rs/ordered/latest/ordered/trait.ArbitraryOrd.html>
There are links in the rustdoc to `ArbitraryOrd` that is behind a feature gate. This makes rustdoc complain that the link is broken. Write out the link in the docs so that rustdoc can resolve it properly when the feature is not enabled.
9e875ab to
a2fe08c
Compare
I'm not sure if I just 'worked out' what you already said or not but #5307 |
|
Sorry for the delays. I'll make it my top rust-bitcoin priority today to get my local CI to pass on the tip of this so we can merge it then get the other backports merged. |
|
Don't have to deal with it in this PR but note that generate-files.sh is out of date here as well :P |
|
utACK a2fe08c ran my local CI on the tip |
See #5281 for reason.
Use the current version of nightly on master (2025-09-26) to lint and format the v0.32.x branch.
Fix all of the lint errors.
Run the formatter.
Fix some rustdoc issues.
Closes #5281