Skip to content

Commit 6e397be

Browse files
committed
all: Suppress warnings from clippy::unnecessary_unwrap
1 parent 98c0334 commit 6e397be

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

chain/ethereum/src/polling_block_stream.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ impl PollingBlockStreamContext {
406406
// block number, and checking to see if the block we found matches the
407407
// subgraph_ptr.
408408

409+
#[allow(clippy::unnecessary_unwrap)]
409410
let subgraph_ptr =
410411
subgraph_ptr.expect("subgraph block pointer should not be `None` here");
411412

graph/src/blockchain/firehose_block_stream.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,12 @@ async fn process_firehose_response<C: Blockchain, F: FirehoseMapper<C>>(
366366
let previous_block_ptr = block.parent_ptr();
367367
if previous_block_ptr.is_some() && previous_block_ptr.as_ref() != subgraph_current_block
368368
{
369+
#[allow(clippy::unnecessary_unwrap)]
370+
let firehose_start_block = previous_block_ptr.unwrap();
369371
warn!(&logger,
370372
"Firehose selected first streamed block's parent should match subgraph start block, reverting to last know final chain segment";
371373
"subgraph_current_block" => &subgraph_current_block.unwrap(),
372-
"firehose_start_block" => &previous_block_ptr.unwrap(),
374+
"firehose_start_block" => &firehose_start_block,
373375
);
374376

375377
let mut revert_to = mapper

store/postgres/src/relational/ddl.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ impl Table {
406406
self.create_table(out)?;
407407
self.create_time_travel_indexes(catalog, out)?;
408408
if index_def.is_some() && ENV_VARS.postpone_attribute_index_creation {
409+
#[allow(clippy::unnecessary_unwrap)]
409410
let arr = index_def
410411
.unwrap()
411412
.indexes_for_table(&self.nsp, &self.name.to_string(), self, false, false, false)

0 commit comments

Comments
 (0)