From 719a59586add4a4782c2e2a85e5d5fb97749d8e5 Mon Sep 17 00:00:00 2001 From: oliver-giersch Date: Sat, 13 Oct 2018 17:28:47 +0200 Subject: Update mod.rs removes unnecessary `unsafe`, adds `unstable` attribute --- src/libstd/thread/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/libstd/thread') 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> 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), })) -- cgit 1.4.1-3-g733a5