diff options
| author | oliver-giersch <oliver.giersch@googlemail.com> | 2018-10-13 17:28:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-13 17:28:47 +0200 |
| commit | 719a59586add4a4782c2e2a85e5d5fb97749d8e5 (patch) | |
| tree | e0d29c8a450a5795c15b1db495320a4dba6da834 /src/libstd/thread | |
| parent | fbb95689d692ba456309927793a28da85d2bf4d1 (diff) | |
| download | rust-719a59586add4a4782c2e2a85e5d5fb97749d8e5.tar.gz rust-719a59586add4a4782c2e2a85e5d5fb97749d8e5.zip | |
Update mod.rs
removes unnecessary `unsafe`, adds `unstable` attribute
Diffstat (limited to 'src/libstd/thread')
| -rw-r--r-- | src/libstd/thread/mod.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index 28e69a1d065..e05a5dc458b 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -391,6 +391,7 @@ impl Builder { } /// TODO: Doc + #[unstable(feature = "thread_spawn_unchecked", issue = "0")] pub unsafe fn spawn_unchecked<'a, F, T>(self, f: F) -> io::Result<JoinHandle<T>> where F: FnOnce() -> T, F: Send + 'a, T: Send + 'a { @@ -421,9 +422,7 @@ impl Builder { }; Ok(JoinHandle(JoinInner { - native: unsafe { - Some(imp::Thread::new(stack_size, Box::new(main))?) - }, + native: Some(imp::Thread::new(stack_size, Box::new(main))?), thread: my_thread, packet: Packet(my_packet), })) |
