-
Notifications
You must be signed in to change notification settings - Fork 13
Turn on a bunch of cippy ints #127
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
apoelstra
merged 9 commits into
BlockstreamResearch:master
from
apoelstra:2025-04--clippy
May 1, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e56d0b7
Merge BlockstreamResearch/simfony#125: Satisfy program with optional …
apoelstra 1c2fa51
clippy: whitelist lints that fire on current nightly
apoelstra 7a7d16b
clippy: copy giant list of lints from bitcoin-units, with all "allow"ed
apoelstra 5130441
clippy: turn on all lints that don't trigger anywhere
apoelstra 53f5610
clippy: use built-in conversion from bool to numeric
apoelstra 9d5a796
clippy: don't use lossless casts
apoelstra 2c7b1fb
clippy: don't use .iter and .iter_mut where not necessary
apoelstra 3fdacb5
clippy: replace flat_map with filter_map
apoelstra 8e15fd3
clippy: invert != in if statements
apoelstra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
msrv = "1.78.0" | ||
# We have an error type, `RichError`, of size 144. This is pushing it but probably fine. | ||
large-error-threshold = 145 | ||
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
Just boxing the
Error
inRichError
would cut down the size a fair bit. I was gonna do a PR to replace theString
errors withanyhow::Error
in a few places, so I'll include it in that.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.
That sounds good. If you can remove this clippy.toml line I'd appreciate it!
Also, because this is both a library and a CLI tool, it may be a judgement call where to use
anyhow
... I'd prefer we not use it on any "library errors" and only on "application errors".Historically we've manually done all our errors, which is a bit tedious. I wouldn't mind if you wanted to introduce
thiserror
here. In rust-simplicity probably not, because we're much more agressive about pruning dependencies there.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.
Yeah anyhow is kind of a lazy hack. Just less so than using
String
. I agree that libraries should use proper errors that you can actually match on. I'll fix up the PR I just opened.