diff --git a/library/src/task.rs b/library/src/task.rs index 23e4b4b..bc59e05 100644 --- a/library/src/task.rs +++ b/library/src/task.rs @@ -33,7 +33,6 @@ async fn schedule(tasks: Vec>) -> Result<(), JobSchedulerError> { // 添加任务 for task in tasks { - let task: &'static Task = Box::leak(Box::new(task)); if task.cron.is_some() { let schedule = task.cron.as_ref().unwrap().as_str(); if let Some(time_zone) = task.time_zone.as_ref() {