diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2022-03-07 22:14:02 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-07 22:14:02 +0000 |
| commit | a3d269e91cceb4d6234668014930f81fff587ff3 (patch) | |
| tree | 4c53488c3227f5b86232ef3a437f94d756abd49e /library/std/src/thread | |
| parent | 9099353ea88c72cb5a62fd7c2af187410295cf5b (diff) | |
| download | rust-a3d269e91cceb4d6234668014930f81fff587ff3.tar.gz rust-a3d269e91cceb4d6234668014930f81fff587ff3.zip | |
Use `f` instead of `|| f()`.
Co-authored-by: Mark Rousskov <mark.simulacrum@gmail.com>
Diffstat (limited to 'library/std/src/thread')
| -rw-r--r-- | library/std/src/thread/scoped.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/thread/scoped.rs b/library/std/src/thread/scoped.rs index 35082495b18..ee2d0e243d4 100644 --- a/library/std/src/thread/scoped.rs +++ b/library/std/src/thread/scoped.rs @@ -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)) }?)) } } |
