Enable Travis.

This commit is contained in:
Andreas Fackler 2018-05-07 11:30:36 +02:00
parent 7dd3aee48b
commit 85bb8d26e3
2 changed files with 20 additions and 3 deletions

18
.travis.yml Normal file
View File

@ -0,0 +1,18 @@
language: rust
rust: nightly-2018-04-19
cache: cargo
before_install:
- rustup component add rustfmt-preview
# - cargo install clippy -f --vers=0.0.195
env:
global:
- RUST_BACKTRACE=1
- RUSTFLAGS="-D warnings"
script:
- cargo fmt -- --write-mode=diff
# TODO: Enable Clippy once https://github.com/rust-lang/rust/issues/49643
# has been resolved. Add tests.
# - cargo clippy -- -D clippy
# - cargo clippy --tests -- -D clippy
# - cargo check --tests
- cargo test

View File

@ -128,9 +128,8 @@ fn count_votes(
.to_filter_builder()
.build();
let vote_logs_filter = web3.eth_filter().create_logs_filter(vote_filter).wait()?;
let votes = vote_logs_filter
.logs()
.wait()?
let vote_logs = vote_logs_filter.logs().wait()?;
let votes = vote_logs
.into_iter()
.map(|vote_log| {
let vote = Vote::from_log(&vote_event.parse_log(vote_log.into_raw())?)?;