diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-04-14 00:23:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-14 00:23:35 +0200 |
| commit | 8ad17ec6e42a2f72853d45b009569a7aaa5cab03 (patch) | |
| tree | 9edbc6d47ebfaf1da37f1747b00e05f15a84ff94 /src/libstd/sys/cloudabi | |
| parent | 1888b55d7b6f18e9707ff9d1a72e48905f7bfde2 (diff) | |
| parent | 6635fbed4ca8c65822f99e994735bd1877fb063e (diff) | |
| download | rust-8ad17ec6e42a2f72853d45b009569a7aaa5cab03.tar.gz rust-8ad17ec6e42a2f72853d45b009569a7aaa5cab03.zip | |
Rollup merge of #59818 - crlf0710:eliminate_libstd_fnbox, r=cramertj
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(); |
