Skip to content

Commit

Permalink
meta: patch async_trait usage on latest nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrasiuk committed Dec 29, 2022
1 parent 28669d4 commit 95cee0a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion crates/interfaces/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ use thiserror::Error;

/// Takes block and executes it, returns error
#[async_trait]
pub trait BlockExecutor {
pub trait BlockExecutor
where
Self: Sized,
{
/// Execute block
async fn execute(&self, _block: Block) -> Error {
Error::VerificationFailed
Expand Down
10 changes: 8 additions & 2 deletions crates/stages/src/test_utils/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ pub(crate) trait ExecuteStageTestRunner: StageTestRunner {
}

/// Run a hook after [Stage::execute]. Required for Headers & Bodies stages.
async fn after_execution(&self, _seed: Self::Seed) -> Result<(), TestRunnerError> {
async fn after_execution(&self, _seed: Self::Seed) -> Result<(), TestRunnerError>
where
Self: Sized,
{
Ok(())
}
}
Expand All @@ -67,7 +70,10 @@ pub(crate) trait UnwindStageTestRunner: StageTestRunner {
async fn unwind(
&self,
input: UnwindInput,
) -> Result<UnwindOutput, Box<dyn std::error::Error + Send + Sync>> {
) -> Result<UnwindOutput, Box<dyn std::error::Error + Send + Sync>>
where
Self: Sized,
{
let (tx, rx) = oneshot::channel();
let (db, mut stage) = (self.tx().inner_raw(), self.stage());
tokio::spawn(async move {
Expand Down

0 comments on commit 95cee0a

Please sign in to comment.