Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
hu55a1n1 committed Jun 15, 2021
1 parent 7c53cab commit 5930552
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions relayer-cli/src/commands/tx/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,7 @@ impl TxUpgradeClientsCmd {
.query_clients(req)
.map_err(|e| Kind::Query.context(e))?
.into_iter()
.filter_map(|cs| {
if self.src_chain_id == cs.client_state.chain_id() {
Some(cs.client_id)
} else {
None
}
})
.filter_map(|c| (self.src_chain_id == c.client_state.chain_id()).then(|| c.client_id))
.map(|id| TxUpgradeClientsCmd::upgrade_client(id, src_chain.clone(), dst_chain.clone()))
.collect();

Expand Down

0 comments on commit 5930552

Please sign in to comment.