1
Fork 0

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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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)) }?))
}
}