Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pashinov committed Feb 12, 2024
1 parent 7c04f5c commit 1d3e684
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::transport::Transport;

pub fn convert_transactions(
transactions: Vec<RawTransaction>,
) -> impl Iterator<Item = Transaction> + DoubleEndedIterator {
) -> impl DoubleEndedIterator<Item = Transaction> {
transactions
.into_iter()
.filter_map(|transaction| Transaction::try_from((transaction.hash, transaction.data)).ok())
Expand Down Expand Up @@ -111,13 +111,14 @@ pub fn parse_block(
let mut is_deployed = contract_state.is_deployed;

for item in account_block.transactions().iter() {
let transaction = match item.and_then(|(_, value)| {
let result = item.and_then(|(_, value)| {
let cell = value.into_cell().reference(0)?;
let hash = cell.repr_hash();

ton_block::Transaction::construct_from_cell(cell)
.map(|data| RawTransaction { hash, data })
}) {
});
let transaction = match result {
Ok(transaction) => transaction,
Err(_) => continue,
};
Expand Down

0 comments on commit 1d3e684

Please sign in to comment.