-
Notifications
You must be signed in to change notification settings - Fork 224
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
Address clippy warnings #55
Conversation
@@ -18,7 +18,12 @@ | |||
html_root_url = "https://docs.rs/tendermint/0.10.0" | |||
)] | |||
|
|||
// NOTE(EB): can't figure out how to easily remove the extern crate per Rust2018 upgrade ... | |||
#[allow(unused_extern_crates)] | |||
extern crate prost_amino as prost; |
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.
Probably the easiest way to actually fix this is through the Cargo.toml:
prost = { package = "prost-amino", version = "0.4.0" }
prost-derive = { package = "prost-amino-derive", version = "0.4.0" }
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 wasn't able to get this working. When I try it and then comment out these extern crate lines, I get tons of errors.
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.
@ebuchman oh, I bet it hasn't been updated to the 2018 edition, so prost-amino-derive
is still dependent on the extern crate
directives.
Probably the best solution would be to switch to upstream prost
when Amino has been fully replaced with protos.
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 cannot wait!
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.
LGTM!
I addressed a few more here:
1a232e5
Not sure why clippy didn't complain about these here.
You may also want to add: #![warn(rust_2018_idioms)] ...to the top of |
I'm using |
I couldn't figure out how to remove the
extern crate
with the rename here. I read https://doc.rust-lang.org/nightly/edition-guide/rust-2018/module-system/path-clarity.html#renaming-crates, but couldn't get it working. Possibly it's because I needed to edit alot more files, but didn't feel I should have to do that. So I also tried https://doc.rust-lang.org/1.28.0/cargo/reference/unstable.html#rename-dependency, but couldn't get it working either. So I just turned off the lint in one spot ...Also the
config_toml_parser
could be broken out a bit but didn't seem like a big deal to just disable the lint for now.