File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1485,9 +1485,10 @@ fn _assert_sync_and_send() {
14851485mod tests {
14861486 use super :: Builder ;
14871487 use crate :: any:: Any ;
1488+ use crate :: mem;
14881489 use crate :: sync:: mpsc:: { channel, Sender } ;
14891490 use crate :: result;
1490- use crate :: thread;
1491+ use crate :: thread:: { self , ThreadId } ;
14911492 use crate :: time:: Duration ;
14921493 use crate :: u32;
14931494
@@ -1717,6 +1718,11 @@ mod tests {
17171718 thread:: sleep ( Duration :: from_millis ( 2 ) ) ;
17181719 }
17191720
1721+ #[ test]
1722+ fn test_size_of_option_thread_id ( ) {
1723+ assert_eq ! ( mem:: size_of:: <Option <ThreadId >>( ) , mem:: size_of:: <ThreadId >( ) ) ;
1724+ }
1725+
17201726 #[ test]
17211727 fn test_thread_id_equal ( ) {
17221728 assert ! ( thread:: current( ) . id( ) == thread:: current( ) . id( ) ) ;
You can’t perform that action at this time.
0 commit comments