From 7d2f2ef8b932f989a35f8ad86e68772298876006 Mon Sep 17 00:00:00 2001 From: DrPeterVanNostrand Date: Tue, 11 Dec 2018 14:44:34 +0000 Subject: [PATCH] Allow use of deprecated type 'ethereum_types::H256::low_u64'. --- src/response/common.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/response/common.rs b/src/response/common.rs index 400e8f7..286647d 100644 --- a/src/response/common.rs +++ b/src/response/common.rs @@ -1,3 +1,6 @@ +// Don't throw a compilation warning for the to be deprecated: 'ethereum_types::H256::low_u64'. +#![allow(deprecated)] + use chrono::{DateTime, NaiveDateTime, Utc}; use ethabi; use web3::types::{Address, H256, U256}; @@ -111,7 +114,7 @@ impl BallotCreatedLog { pub fn from_ethabi_log(log: ethabi::Log, block_number: U256) -> Result { let mut ballot_id: Option = None; let mut ballot_type: Option = None; - let mut creator: Option
= None; + let mut creator: Option
= None; for ethabi::LogParam { name, value } in log.params { match name.as_ref() { "id" => ballot_id = value.to_uint(), @@ -119,7 +122,7 @@ impl BallotCreatedLog { "creator" => creator = value.to_address(), name => unreachable!("Found unknown `BallotCreated` event log field: {}", name), }; - } + } let ballot_id = match ballot_id { Some(id) => id, None => return Err(Error::FailedToParseBallotCreatedLog("missing `id`".into())),