Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

fix: remove needless use of itertools #11029

Merged
merged 1 commit into from
Sep 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ethcore/engines/authority-round/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1506,7 +1506,7 @@ impl Engine for AuthorityRound {

let mut hash = *chain_head.parent_hash();

let mut ancestry = itertools::repeat_call(move || {
let mut ancestry = std::iter::repeat_with(move || {
chain(hash).and_then(|header| {
if header.number() == 0 { return None }
hash = *header.parent_hash();
Expand Down Expand Up @@ -1548,7 +1548,7 @@ impl Engine for AuthorityRound {
// to construct transition proof. author == ec_recover(sig) known
// since the blocks are in the DB.
let mut hash = chain_head.hash();
let mut finality_proof: Vec<_> = itertools::repeat_call(move || {
let mut finality_proof: Vec<_> = std::iter::repeat_with(move || {
chain(hash).and_then(|header| {
hash = *header.parent_hash();
if header.number() == 0 { None }
Expand Down
1 change: 0 additions & 1 deletion ethcore/light/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ rlp_derive = { path = "../../util/rlp-derive" }
smallvec = "0.6"
futures = "0.1"
rand = "0.6"
itertools = "0.5"
bincode = "1.1"
serde = "1.0"
serde_derive = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion ethcore/light/src/client/header_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ impl HeaderChain {
let canon = &era_entry.candidates[0];
(canon.hash, canon.total_difficulty)
};
cht::compute_root(cht_num, ::itertools::repeat_call(iter))
cht::compute_root(cht_num, std::iter::repeat_with(iter))
.expect("fails only when too few items; this is checked; qed")
};

Expand Down
2 changes: 0 additions & 2 deletions ethcore/light/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,9 @@ extern crate ethereum_types;
extern crate ethcore_miner as miner;
extern crate hash_db;
extern crate parity_util_mem;
extern crate parity_util_mem as mem;
extern crate parity_util_mem as malloc_size_of;
extern crate failsafe;
extern crate futures;
extern crate itertools;
extern crate keccak_hasher;
extern crate machine;
extern crate memory_db;
Expand Down