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() -> ! {
33
33
/// [`std::thread::JoinHandle`] with extra functionalities.
34
34
#[ derive( Debug ) ]
35
35
pub struct JoinHandle < T > {
36
- #[ allow( dead_code) ]
37
- std_handle : thread:: JoinHandle < T > ,
36
+ _std_handle : thread:: JoinHandle < T > ,
38
37
thread : Thread ,
39
38
}
40
39
@@ -69,7 +68,10 @@ pub fn spawn(f: impl FnOnce() + Send + 'static) -> JoinHandle<()> {
69
68
// Wait until the just-spawned thread configures its own `THREAD_DATA`.
70
69
thread:: park ( ) ;
71
70
72
- JoinHandle { std_handle, thread }
71
+ JoinHandle {
72
+ _std_handle : std_handle,
73
+ thread,
74
+ }
73
75
}
74
76
75
77
impl < T > JoinHandle < T > {
Original file line number Diff line number Diff line change @@ -22,8 +22,7 @@ pub use std::thread::ThreadId;
22
22
/// [`std::thread::JoinHandle`] with extra functionalities.
23
23
#[ derive( Debug ) ]
24
24
pub struct JoinHandle < T > {
25
- #[ allow( dead_code) ]
26
- std_handle : thread:: JoinHandle < T > ,
25
+ _std_handle : thread:: JoinHandle < T > ,
27
26
thread : Thread ,
28
27
}
29
28
@@ -42,7 +41,10 @@ pub fn spawn(f: impl FnOnce() + Send + 'static) -> JoinHandle<()> {
42
41
43
42
let thread = Thread { data } ;
44
43
45
- JoinHandle { std_handle, thread }
44
+ JoinHandle {
45
+ _std_handle : std_handle,
46
+ thread,
47
+ }
46
48
}
47
49
48
50
impl < T > JoinHandle < T > {
You can’t perform that action at this time.
0 commit comments