Skip to content

Commit

Permalink
Use f instead of || f().
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Rousskov <mark.simulacrum@gmail.com>
  • Loading branch information
m-ou-se and Mark-Simulacrum committed Mar 7, 2022
1 parent 9099353 commit a3d269e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/thread/scoped.rs
Expand Up @@ -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)) }?))
}
}

Expand Down

0 comments on commit a3d269e

Please sign in to comment.