Skip to content

Commit

Permalink
fix: BASTAAAA
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Jan 22, 2024
1 parent 5f6e632 commit 4539b8f
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions ic-task-scheduler/src/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,14 @@ where
}

#[cfg(test)]
#[allow(clippy::type_complexity)]
mod test {

use super::*;

type SaveStateCb =
Pin<Box<dyn Future<Output = std::result::Result<(), (RejectionCode, String)>>>>;

mod test_execution {

use std::cell::RefCell;
Expand Down Expand Up @@ -475,10 +479,7 @@ mod test {
Ok(())
}

fn report_state_cb(
state: TaskExecutionState,
) -> Pin<Box<dyn Future<Output = std::result::Result<(), (RejectionCode, String)>>>>
{
fn report_state_cb(state: TaskExecutionState) -> SaveStateCb {
Box::pin(async { report_state(state).await })
}

Expand Down Expand Up @@ -691,10 +692,7 @@ mod test {
Ok(())
}

fn report_state_cb(
state: TaskExecutionState,
) -> Pin<Box<dyn Future<Output = std::result::Result<(), (RejectionCode, String)>>>>
{
fn report_state_cb(state: TaskExecutionState) -> SaveStateCb {
Box::pin(async { report_state(state).await })
}
}
Expand Down Expand Up @@ -1111,10 +1109,7 @@ mod test {
Ok(())
}

fn report_state_cb(
state: TaskExecutionState,
) -> Pin<Box<dyn Future<Output = std::result::Result<(), (RejectionCode, String)>>>>
{
fn report_state_cb(state: TaskExecutionState) -> SaveStateCb {
Box::pin(async { report_state(state).await })
}
}
Expand Down

0 comments on commit 4539b8f

Please sign in to comment.