Skip to content

Commit

Permalink
use latest clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega committed Jan 17, 2025
1 parent 4a7d861 commit 8f9c77f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions examples/crawler/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ use pallas::{

// An arbitrary predicate to decide whether to save the block or not;
// fill in with your own purpose built logic
async fn block_matches<'a>(block: &MultiEraBlock<'a>) -> bool {
async fn block_matches(block: &MultiEraBlock<'_>) -> bool {
// As an example, we save any blocks that have an "Update proposal" in any era
block.update().is_some() || block.txs().iter().any(|tx| tx.update().is_some())
}

// An arbitrary predicate to decide whether to save the transaction or not;
// fill in with your own purpose built logic
async fn tx_matches<'a>(_tx: &MultiEraTx<'a>) -> bool {
async fn tx_matches(_tx: &MultiEraTx<'_>) -> bool {
false
}

Expand All @@ -41,7 +41,8 @@ async fn main() -> Result<()> {
.await?;

loop {
// We either request the next block, or wait until we're told that the block is ready
// We either request the next block, or wait until we're told that the block is
// ready
let next = client.chainsync().request_or_await_next().await?;
// And depending on the message we receive...
match next {
Expand Down Expand Up @@ -101,7 +102,8 @@ struct Args {
/// The network magic used to handshake with that node; defaults to mainnet
#[arg(short, long, env("CARDANO_NETWORK_MAGIC"), default_value_t = 764824073)]
pub network_magic: u64,
/// A list of points to use when trying to decide a startpoint; defaults to origin
/// A list of points to use when trying to decide a startpoint; defaults to
/// origin
#[arg(short, long, value_parser = parse_point)]
pub point: Vec<Point>,
/// Download only the first block found that matches this criteria
Expand Down

0 comments on commit 8f9c77f

Please sign in to comment.