Skip to content

Commit f1e9b30

Browse files
committed
fix clippy warning
1 parent 50f31c2 commit f1e9b30

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/server/cronjobs.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ use std::thread;
77
use std::time::Duration;
88

99
const DAY: Duration = Duration::from_secs(60 * 60 * 24);
10+
// The tuple is composed of:
11+
// - job name
12+
// - interval between executions
13+
// - function to execute at specified intervals
14+
type JobDescription = (&'static str, Duration, fn(Arc<Data>) -> Fallible<()>);
1015

1116
lazy_static! {
12-
// The tuple is composed of:
13-
// - job name
14-
// - interval between executions
15-
// - function to execute at specified intervals
16-
static ref JOBS: Vec<(&'static str, Duration, fn(Arc<Data>) -> Fallible<()>)> = {
17+
static ref JOBS: Vec<JobDescription> = {
1718
let mut jobs = Vec::new();
1819
jobs.push((
1920
"crate list update",

0 commit comments

Comments
 (0)