Upgrade to Rust stable.
Rust 1.29.0 now comes with both rustfmt-preview and clippy-preview components, so it removes the need for using nightly.
This commit is contained in:
parent
280006dd95
commit
6a20b3d91f
|
@ -5,7 +5,7 @@ dist: trusty
|
|||
language: rust
|
||||
services: docker
|
||||
sudo: required
|
||||
rust: nightly-2018-05-19
|
||||
rust: 1.29.0
|
||||
cache: cargo
|
||||
|
||||
env:
|
||||
|
@ -24,7 +24,7 @@ before_install:
|
|||
- set -e
|
||||
- rustup self update
|
||||
- rustup component add rustfmt-preview
|
||||
- cargo install clippy -f --vers=0.0.202
|
||||
- rustup component add clippy-preview
|
||||
|
||||
install:
|
||||
- sh ci/install.sh
|
||||
|
@ -44,7 +44,7 @@ deploy:
|
|||
file_glob: true
|
||||
file: $CRATE_NAME-$TRAVIS_TAG-$TARGET.*
|
||||
on:
|
||||
condition: $TRAVIS_RUST_VERSION = nightly-2018-05-19
|
||||
branch: master
|
||||
tags: true
|
||||
provider: releases
|
||||
skip_cleanup: true
|
||||
|
|
|
@ -661,7 +661,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "poa-ballot-stats"
|
||||
version = "0.2.1"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"colored 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
15
src/cli.rs
15
src/cli.rs
|
@ -15,34 +15,29 @@ pub fn get_matches() -> ArgMatches<'static> {
|
|||
.value_name("URL")
|
||||
.help("The JSON-RPC endpoint")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
).arg(
|
||||
Arg::with_name("verbose")
|
||||
.short("v")
|
||||
.long("verbose")
|
||||
.help("More detailed output")
|
||||
.takes_value(false),
|
||||
)
|
||||
.arg(
|
||||
).arg(
|
||||
Arg::with_name("contracts")
|
||||
.short("c")
|
||||
.long("contracts")
|
||||
.help("JSON file with the contract addresses")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
).arg(
|
||||
Arg::with_name("period")
|
||||
.short("p")
|
||||
.long("period")
|
||||
.help("The period in which votes should be counted, e.g. '5 days', '2 months'.")
|
||||
.takes_value(true),
|
||||
)
|
||||
.arg(
|
||||
).arg(
|
||||
Arg::with_name("block")
|
||||
.short("b")
|
||||
.long("block")
|
||||
.help("The earliest block in which votes should be counted.")
|
||||
.takes_value(true),
|
||||
)
|
||||
.get_matches()
|
||||
).get_matches()
|
||||
}
|
||||
|
|
|
@ -25,7 +25,10 @@ use std::fs::File;
|
|||
use std::time::SystemTime;
|
||||
|
||||
// The `use_contract!` macro triggers several Clippy warnings.
|
||||
#[cfg_attr(feature = "cargo-clippy", allow(too_many_arguments, redundant_closure, needless_update))]
|
||||
#[cfg_attr(
|
||||
feature = "cargo-clippy",
|
||||
allow(too_many_arguments, redundant_closure, needless_update)
|
||||
)]
|
||||
mod contracts {
|
||||
use_contract!(
|
||||
voting,
|
||||
|
|
|
@ -97,8 +97,7 @@ impl TopicFilterExt for ethabi::TopicFilter {
|
|||
self.topic1.to_opt_vec(),
|
||||
self.topic2.to_opt_vec(),
|
||||
self.topic3.to_opt_vec(),
|
||||
)
|
||||
.from_block(web3::types::BlockNumber::Earliest)
|
||||
).from_block(web3::types::BlockNumber::Earliest)
|
||||
.to_block(web3::types::BlockNumber::Latest)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue