Fix compiler error from Rust 1.87, pacify Clippy 1.88#1935
Merged
Conversation
ImplOfAnImpl
commented
Jul 1, 2025
| disallowed-types = [] | ||
| enforced-import-renames = [] | ||
| large-error-threshold = 256 | ||
| enum-variant-size-threshold = 256 |
Contributor
Author
There was a problem hiding this comment.
FYI: for some reason Clippy started to complain about "large size difference between variants" for multiple enums, even though the default value for enum-variant-size-threshold doesn't seem to have changed between the compiler versions. I decided to set it to 256 explicitly, for consistency with large-error-threshold, this silenced the complaints.
ImplOfAnImpl
commented
Jul 1, 2025
|
|
||
| // Decode and encode 1_048_576 chars 'X' | ||
| let result = Some(format!("!{:X<4194304}!", "")); | ||
| let result = Some(std::iter::repeat_n('X', 1_048_576).collect::<String>()); |
Contributor
Author
There was a problem hiding this comment.
FYI: this was a hard error (probably since 1.87, the version I've skipped) - integer out of range for u16 in format string
ImplOfAnImpl
commented
Jul 1, 2025
| let possible_python_execs = ["python3", "python"]; | ||
|
|
||
| let file_suffix = (env::consts::OS == "windows").then_some(".exe").unwrap_or_default(); | ||
| let file_suffix = if env::consts::OS == "windows" { |
Contributor
Author
There was a problem hiding this comment.
FYI: the complaint was:
error: this method chain can be written more clearly with `if .. else ..`
--> test/runner/functional.rs:73:23
|
73 | let file_suffix = (env::consts::OS == "windows").then_some(".exe").unwrap_or_default();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `if env::consts::OS == "windows" { ".exe" } else { Default::default() }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#obfuscated_if_else
= note: `-D clippy::obfuscated-if-else` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::obfuscated_if_else)]`
Same for the similar changes in the wallet.
dc3401f to
f05a8c3
Compare
OBorce
approved these changes
Jul 1, 2025
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
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.
No description provided.