-
Notifications
You must be signed in to change notification settings - Fork 223
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
Fix clippy lints for rlp-derive #345
Conversation
It looks like @vorot93 signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
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.
Not sure I can say this is an improvement, but sure, why not.
@@ -10,62 +10,62 @@ use rlp::{decode, encode}; | |||
use rlp_derive::{RlpDecodable, RlpDecodableWrapper, RlpEncodable, RlpEncodableWrapper}; | |||
|
|||
#[derive(Debug, PartialEq, RlpEncodable, RlpDecodable)] | |||
struct Foo { | |||
struct Item { |
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.
lol, I didn't know it this lint existed https://rust-lang.github.io/rust-clippy/current/index.html#blacklisted_name
Not sure how useful it is though
let attack_of = String::from("clones"); | ||
let foo = Foo { a: attack_of.clone() }; | ||
let attack_of = "clones"; | ||
let item = Item { a: attack_of.into() }; |
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.
it was a pun on attack of clones
:(
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.
Clippy has exactly zero sense of humour.
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.
I don't think this is much of an improvement either but sure why not.
Can someone point me to the lint ihat replaces |
https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else I'm not a fan of this lint because it is more personal style preference, should be whitelisted IMHO. |
I for one much prefer the @vorot93 do you mind whitelisting this one and revert those changes? |
I can whitelist but I do think that |
Let's obey clippy. |
* master: kvdb-rocksdb: bump version (#348) kvdb-rocksdb: expose RocksDB stats (#347) Implement Error for FromDecStrErr (#346) Fix clippy lints for rlp-derive (#345) prepare rlp-derive release (#344) Update/change licenses: MIT/Apache2.0 (#342) rlp-derive extracted (#343) Format for readme and changelog corrected (#341) Parity runtime moved to parity common for publication in crates.io (#271) Disable cache if explicit memory budget=0 passed (#339)
No description provided.