Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyja committed Mar 5, 2024
1 parent 83b06a8 commit f87f599
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion cja/src/cron/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use std::{collections::HashMap, future::Future, pin::Pin, time::Duration};

use chrono::{OutOfRangeError, Utc};
use miette::Diagnostic;
use tokio::time::Instant;
use tracing::error;

use crate::{app_state::AppState as AS, jobs::Job};
Expand Down
8 changes: 1 addition & 7 deletions cja/src/cron/worker.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::{collections::HashMap, time::Duration};

use chrono::{DateTime, Utc};
use tokio::time::Instant;

use crate::app_state::AppState as AS;

Expand Down Expand Up @@ -31,12 +30,7 @@ impl<AppState: AS> Worker<AppState> {

let last_run_map: HashMap<&str, DateTime<Utc>> = last_runs
.iter()
.map(|row| {
(
row.name.as_str(),
row.last_run_at.unwrap_or_default().into(),
)
})
.map(|row| (row.name.as_str(), row.last_run_at.unwrap_or_default()))
.collect();
self.tick(&worker_id, &last_run_map).await?;

Expand Down

0 comments on commit f87f599

Please sign in to comment.