You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
d75126e clippy: allow `uninlined_format_args` (valued mammal)
cbf0cfe chore: update rust-version to 1.88.0 (valued mammal)
aa53cc1 clippy: fix uninlined format args (valued mammal)
Pull request description:
Fix#281 by taking clippy's suggestion to inline the arguments to a `format!` string where applicable.
Also update `rust-version` to 1.88.0, closing #280.
### Notes to the reviewers
I've gone ahead and fixed the clippy warnings, although some have argued that the lint is quite pedantic and not entirely helpful when it comes to style and readability. Therefore I also allowed the lint to prevent clippy from warning about it in the future d75126e. That change can be reverted if/when rust lang moves `uninlined_format_args` back to the pedantic, i.e. not default group of lints rust-lang/rust-clippy#15287.
### Checklists
#### All Submissions:
* [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
* [ ] ~~This pull request breaks the existing API~~
ACKs for top commit:
notmandatory:
ACK d75126e
oleonardolima:
ACK d75126e
Tree-SHA512: c34e701fb08f6ada2b0f34c87c93417ca966b021360fa787563f00c6968444028a876bfaf6952cf468f8ad834556b784002d4fc7fd09886fc7420ff1cb6eff9d
Copy file name to clipboardExpand all lines: wallet/src/descriptor/checksum.rs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -76,11 +76,11 @@ mod test {
76
76
#[test]
77
77
fntest_calc_checksum_invalid_character(){
78
78
let sparkle_heart = unsafe{ core::str::from_utf8_unchecked(&[240,159,146,150])};
79
-
let invalid_desc = format!("wpkh(tprv8ZgxMBicQKsPdpkqS7Eair4YxjcuuvDPNYmKX3sCniCf16tHEVrjjiSXEkFRnUH77yXc6ZcwHHcL{}fjdi5qUvw3VDfgYiH5mNsj5izuiu2N/1/2/*)", sparkle_heart);
79
+
let invalid_desc = format!("wpkh(tprv8ZgxMBicQKsPdpkqS7Eair4YxjcuuvDPNYmKX3sCniCf16tHEVrjjiSXEkFRnUH77yXc6ZcwHHcL{sparkle_heart}fjdi5qUvw3VDfgYiH5mNsj5izuiu2N/1/2/*)");
80
80
81
81
assert_matches!(
82
82
calc_checksum(&invalid_desc),
83
-
Err(DescriptorError::Miniscript(miniscript::Error::BadDescriptor(e)))if e == format!("Invalid character in checksum: '{}'", sparkle_heart)
83
+
Err(DescriptorError::Miniscript(miniscript::Error::BadDescriptor(e)))if e == format!("Invalid character in checksum: '{sparkle_heart}'")
0 commit comments