-
Notifications
You must be signed in to change notification settings - Fork 169
Fix all lint errors and warnings #670
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clippy emits: error: redundant field names in struct initialization As suggested, remove redundant field names in struct initialization
clippy emits: error: this expression creates a reference which is immediately dereferenced by the compiler As suggested, remove the explicit reference.
clippy emits two warnings of form: error: using `clone` on type ... which implements the `Copy` trait As suggested, remove redundant call to `clone()`.
clippy emits: error: redundant closure As suggested, remove the redundant closure.
clippy emits: error: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)` As suggested, use `map` combinator.
The explicit array access is clear, just shoosh the linter.
Get more Rusty, use iterator instead of array access. While we are at it don't explicitly create the slice, that is a hangover from Rust 1.48
clippy emits: error: field assignment outside of initializer for an instance created with Default::default() Use struct update syntax instead.
apoelstra
approved these changes
Mar 28, 2024
Member
apoelstra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 7634642 thanks! we should re-enabled Clippy in CI in this repo...I believe we disabled it due to a clippy bug in July
heap-coder
added a commit
to heap-coder/rust-miniscript
that referenced
this pull request
Sep 27, 2025
76346427f9f1ea8624ca6e1e1bb228a718c26e88 Use struct update syntax (Tobin C. Harding)
2bc083e607da8609d82123cd3505071898e4a14a Use iterator instead of manual loop (Tobin C. Harding)
6d663e15cee0586579fd5ef00812b3875b6ae382 Allow range loop in test code (Tobin C. Harding)
a8c156e8787798f8d2b728d9adc54332a865c015 Use map instead of and_then (Tobin C. Harding)
d5662dae0152f27bb81e464dbc9a91cd409e8109 Remove redundant closure (Tobin C. Harding)
90f1585a2f163f6328952fd56b272a6e05457e08 Remove redundant clone (Tobin C. Harding)
409d4b08af6213ab75fb78f78e68be2b024e5da3 Remove explicit reference (Tobin C. Harding)
9ec6b1767f2c182a40349b8d58e3c88252dafc61 Remove redundant field names in struct initialization (Tobin C. Harding)
Pull request description:
After doing #668 I wanted to be able to use the `just sane` command before pushing PRs, so fix the lint issues.
ACKs for top commit:
apoelstra:
ACK 76346427f9f1ea8624ca6e1e1bb228a718c26e88 thanks! we should re-enabled Clippy in CI in this repo...I believe we disabled it due to a clippy bug in July
Tree-SHA512: 1e953f2fc1a6e649324293a84abf1be54feca6095111653af046aacf17a83e6ae15452fe8825599ccbfae0ea84fe7d1988c8b72d5dd902c9d0fb1d34e660ef8b
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After doing #668 I wanted to be able to use the
just sanecommand before pushing PRs, so fix the lint issues.