Skip to content

Commit

Permalink
fix(tasks): pass closure instead of variable
Browse files Browse the repository at this point in the history
  • Loading branch information
petarvujovic98 committed Jul 16, 2024
1 parent 91ac590 commit e7c72b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/src/mem_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ impl InMemoryTaskDb {
let proving_status_records = self
.enqueue_task
.get(key)
.ok_or_else(TaskManagerError::SqlError("no task in db".to_owned()))?;
.ok_or_else(|| TaskManagerError::SqlError("no task in db".to_owned()))?;

let (_, proof, ..) = proving_status_records
.into_iter()
.iter()
.filter(|(status, ..)| (status == &TaskStatus::Success))
.last()
.ok_or_else(|| TaskManagerError::SqlError("no successful task in db".to_owned()))?;
Expand Down

0 comments on commit e7c72b6

Please sign in to comment.