Use FnOnce() + Send as task func

This commit is contained in:
Ruihan Li
2025-01-19 08:45:04 +09:00
committed by Tate, Hongliang Tian
parent 6a865062e6
commit 2cf4aebe7a
2 changed files with 3 additions and 3 deletions

View File

@ -149,7 +149,7 @@ impl TaskOptions {
/// Creates a set of options for a task.
pub fn new<F>(func: F) -> Self
where
F: FnOnce() + Send + Sync + 'static,
F: FnOnce() + Send + 'static,
{
Self {
func: Some(Box::new(func)),