File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,7 @@ pub unsafe fn exit_thread() -> ! {
3333/// [`std::thread::JoinHandle`] with extra functionalities.
3434#[ derive( Debug ) ]
3535pub struct JoinHandle < T > {
36- #[ allow( dead_code) ]
37- std_handle : thread:: JoinHandle < T > ,
36+ _std_handle : thread:: JoinHandle < T > ,
3837 thread : Thread ,
3938}
4039
@@ -69,7 +68,10 @@ pub fn spawn(f: impl FnOnce() + Send + 'static) -> JoinHandle<()> {
6968 // Wait until the just-spawned thread configures its own `THREAD_DATA`.
7069 thread:: park ( ) ;
7170
72- JoinHandle { std_handle, thread }
71+ JoinHandle {
72+ _std_handle : std_handle,
73+ thread,
74+ }
7375}
7476
7577impl < T > JoinHandle < T > {
Original file line number Diff line number Diff line change @@ -22,8 +22,7 @@ pub use std::thread::ThreadId;
2222/// [`std::thread::JoinHandle`] with extra functionalities.
2323#[ derive( Debug ) ]
2424pub struct JoinHandle < T > {
25- #[ allow( dead_code) ]
26- std_handle : thread:: JoinHandle < T > ,
25+ _std_handle : thread:: JoinHandle < T > ,
2726 thread : Thread ,
2827}
2928
@@ -42,7 +41,10 @@ pub fn spawn(f: impl FnOnce() + Send + 'static) -> JoinHandle<()> {
4241
4342 let thread = Thread { data } ;
4443
45- JoinHandle { std_handle, thread }
44+ JoinHandle {
45+ _std_handle : std_handle,
46+ thread,
47+ }
4648}
4749
4850impl < T > JoinHandle < T > {
You can’t perform that action at this time.
0 commit comments