diff options
| author | CrLF0710 <crlf0710@gmail.com> | 2019-04-10 00:46:28 +0800 |
|---|---|---|
| committer | CrLF0710 <crlf0710@gmail.com> | 2019-04-10 09:40:44 +0800 |
| commit | 6635fbed4ca8c65822f99e994735bd1877fb063e (patch) | |
| tree | b025f0af7d69a1aa1713e81fbece7dfad30c1b3a /src/libstd/sys/cloudabi | |
| parent | 3750348daff89741e3153e0e120aa70a45ff5b68 (diff) | |
| download | rust-6635fbed4ca8c65822f99e994735bd1877fb063e.tar.gz rust-6635fbed4ca8c65822f99e994735bd1877fb063e.zip | |
Eliminate `FnBox` usages from libstd.
Diffstat (limited to 'src/libstd/sys/cloudabi')
| -rw-r--r-- | src/libstd/sys/cloudabi/thread.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstd/sys/cloudabi/thread.rs b/src/libstd/sys/cloudabi/thread.rs index f853346e0e6..7da16c4d247 100644 --- a/src/libstd/sys/cloudabi/thread.rs +++ b/src/libstd/sys/cloudabi/thread.rs @@ -1,4 +1,3 @@ -use crate::boxed::FnBox; use crate::cmp; use crate::ffi::CStr; use crate::io; @@ -22,7 +21,7 @@ unsafe impl Sync for Thread {} impl Thread { // unsafe: see thread::Builder::spawn_unchecked for safety requirements - pub unsafe fn new(stack: usize, p: Box<dyn FnBox()>) -> io::Result<Thread> { + pub unsafe fn new(stack: usize, p: Box<dyn FnOnce()>) -> io::Result<Thread> { let p = box p; let mut native: libc::pthread_t = mem::zeroed(); let mut attr: libc::pthread_attr_t = mem::zeroed(); |
