Use f instead of || f().

Co-authored-by: Mark Rousskov <mark.simulacrum@gmail.com>
This commit is contained in:
Mara Bos
2022-03-07 22:14:02 +00:00
committed by GitHub
parent 9099353ea8
commit a3d269e91c

View File

@@ -231,7 +231,7 @@ impl Builder {
F: FnOnce() -> T + Send + 'scope,
T: Send + 'scope,
{
Ok(ScopedJoinHandle(unsafe { self.spawn_unchecked_(|| f(), Some(&scope.data)) }?))
Ok(ScopedJoinHandle(unsafe { self.spawn_unchecked_(f, Some(&scope.data)) }?))
}
}