Skip to content

Commit a3d269e

Browse files
Use f instead of || f().
Co-authored-by: Mark Rousskov <[email protected]>
1 parent 9099353 commit a3d269e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/thread/scoped.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ impl Builder {
231231
F: FnOnce() -> T + Send + 'scope,
232232
T: Send + 'scope,
233233
{
234-
Ok(ScopedJoinHandle(unsafe { self.spawn_unchecked_(|| f(), Some(&scope.data)) }?))
234+
Ok(ScopedJoinHandle(unsafe { self.spawn_unchecked_(f, Some(&scope.data)) }?))
235235
}
236236
}
237237

0 commit comments

Comments
 (0)