Clippy lints MSRV 1.56.1#640
Clippy lints MSRV 1.56.1#640apoelstra merged 1 commit intorust-bitcoin:masterfrom storopoli:js/clippy-lints-1.56.1
Conversation
src/psbt/mod.rs
Outdated
| .sha256_preimages | ||
| .get(&Pk::to_sha256(h)) | ||
| .and_then(try_vec_as_preimage32) | ||
| .and_then(|x: &std::vec::Vec<u8>| try_vec_as_preimage32(x)) |
There was a problem hiding this comment.
This won't work in no-std builds, just use plain old Vec, its imported already in this file using use prelude::*.
There was a problem hiding this comment.
Done, this seems obvious now in retrospect...
| let mut pk_map = HashMap::new(); | ||
| let mut pkh_map = HashMap::new(); | ||
| for (i, c) in (b'A'..b'Z').enumerate() { | ||
| for (i, c) in (b'A'..=b'Z').enumerate() { |
There was a problem hiding this comment.
This changes the behaviour of the loop to now include 'Z', from looking at the code it looks like this was a bug and the change is correct but this change warranted a patch on its own with a comment on the bug. Since its test code, I think we can leave it as is now though.
BTW I've got deja vu reviewing this, I've definitely removed these lint warnings before somewhere. I can't remember where but I remember hitting this 'Z' thing especially.
There was a problem hiding this comment.
Yeah, I remember this too. #523 It was even mixed in with CI crap.
|
Woops I acked, but needs the Vec change. CI should catch that though. |
|
@storopoli ok, I merged your other two PRs. Can you rebase this one and get CI working? |
Nothing out of the ordinary. The most alarming was the non-inclusive range in `test_utils.rs`. In some test functions I allowed myself to use `#[allow(clippy::type_complexity)]` because clippy was asking to create a type instead of using the big tuple. Since these were used just once, I thought it was overkill. Note, depends on: - #639 (we can also merge this into it instead of `master`) - #638 (has some allows on dead_code)
|
Hooray! |
|
Lol @ the Thanks very much for fixing CI. Funny how every clippy update finds a new category of "unnecessary |
Probably a simple Tuple Struct
Yes, clippy lints are truly amazing. Never stops to impress me... |
e2636f390a41e43292b47a2eb7aeea1e3aa34a50 Clippy lints MSRV 1.56.1 (Jose Storopoli)
Pull request description:
Nothing out of the ordinary.
The most alarming was the non-inclusive range in
`test_utils.rs`.
In some test functions I allowed myself to use
`#[allow(clippy::type_complexity)]` because clippy was asking to create a type instead of using the big tuple. Since these were used just once, I thought it was overkill.
Note, depends on:
- #639 (we can also merge this into it instead of `master`)
- #638 (has some allows on dead_code)
ACKs for top commit:
apoelstra:
ACK e2636f390a41e43292b47a2eb7aeea1e3aa34a50
Tree-SHA512: d1f38d1e2a1415da816898806377c90986072fe0bc9a9dbc3e5476026c05c53743453cbd0a237a70aa27762f1be86e44c19422575b7e62f686140accc412177c
Nothing out of the ordinary.
The most alarming was the non-inclusive range in
test_utils.rs.In some test functions I allowed myself to use
#[allow(clippy::type_complexity)]because clippy was asking to create a type instead of using the big tuple. Since these were used just once, I thought it was overkill.Note, depends on:
master)max_satisfaction_weight#638 (has some allows on dead_code)