Fixed a bunch of clippy lints, added clippy.toml#686
Fixed a bunch of clippy lints, added clippy.toml#686RCasatta merged 1 commit intorust-bitcoin:masterfrom
Conversation
e70297b to
fea88ae
Compare
sanket1729
left a comment
There was a problem hiding this comment.
ACK fea88aea33a9ac2d03a77cf08eade0ebdad2da01
Of possible relevance to this work is: #688 (further configures clippy). |
DON-MAC-256
left a comment
There was a problem hiding this comment.
Nice changes, including some that should help prevent the introduction of bugs later on.
ACK
src/blockdata/transaction.rs
Outdated
There was a problem hiding this comment.
#[derive(ParialEq, Eq, PartialOrd, Ord)], according to our new contributing guidelines :)
There was a problem hiding this comment.
TBH, I'm not really convinced errors should commit to Ord/PartialOrd. Maybe Eq is fine.
There was a problem hiding this comment.
If there's Eq there should be Hash, I believe.
In this specific case I'm not even sure about Eq. Are two errors carrying information saying "can't recognize sighash string" (by their existence) that were caused by different input (which they write for ease of debugging) equal or not?
src/network/message.rs
Outdated
There was a problem hiding this comment.
Here I still think #[derive(PartialEq, Eq)] will be nice to have
|
@Kixunil needs rebase :( |
693f666
|
Rebased |
dr-orlovsky
left a comment
There was a problem hiding this comment.
ACK 693f6666da64bf3140d50ca9983f3968c4c69802 with one small nit
src/network/message.rs
Outdated
There was a problem hiding this comment.
Here I still think #[derive(PartialEq, Eq)] will be nice to have
|
Will wait a bit if others have an opinion on this. Basically the question is "Do we want to commit to always carry error information that can be meaningfully compared?" |
|
If I remember correctly @apoelstra doesn't like struct initialization shorthand |
|
Shame, I do like it but willing to |
|
Adding allows everywhere will be messy as hell, structs get initialized all over the place. Probably best to let @apoelstra comment before starting a fight in his name though :) |
|
@tcharding I think they could be allowed globally in |
|
yeah, I realised this last night when I was going to sleep :) |
|
Sorry for being absent. I don't like the compact struct initialization format but I won't hold things up about it. I'm used to it by now :). Regarding errors satisfying Needs rebase. |
This is the initial step towards using and maybe enforcing clippy. It does not fix all lints as some are not applicable. They may be explicitly ignored later.
|
Rebased |
This is the initial step towards using and maybe enforcing clippy.
It does not fix all lints as some are not applicable. They may be
explicitly ignored later.
Some discussion about clippy was in #685