Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
simpler way to downcast
Browse files Browse the repository at this point in the history
  • Loading branch information
lostman committed Sep 13, 2023
1 parent 46507e8 commit c295242
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/fuel-indexer/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use fuel_vm::state::ProgramState as ClientProgramState;
use futures::Future;
use itertools::Itertools;
use std::{
error::Error,
marker::{Send, Sync},
path::Path,
str::FromStr,
Expand Down Expand Up @@ -869,10 +868,7 @@ impl Executor for WasmIndexExecutor {
self.db.lock().await.revert_transaction().await?;
return Err(IndexerError::RunTimeLimitExceededError);
} else {
if let Some(e) = e
.source()
.and_then(|e| e.downcast_ref::<WasmIndexerError>())
{
if let Some(e) = e.downcast_ref::<WasmIndexerError>() {
match e {
// Termination due to kill switch is an expected behavior.
WasmIndexerError::KillSwitch => {
Expand Down

0 comments on commit c295242

Please sign in to comment.