77// option. This file may not be copied, modified, or distributed
88// except according to those terms.
99
10- #[ cfg( not( any( feature = "force-inprocess" , target_os = "android" , target_os = "ios" ) ) ) ]
11- use crate :: ipc:: IpcReceiver ;
12- use crate :: ipc:: { self , IpcReceiverSet , IpcSender , IpcSharedMemory } ;
13- use crate :: router:: { RouterProxy , ROUTER } ;
14- use crossbeam_channel:: { self , Sender } ;
15- use serde:: { Deserialize , Deserializer , Serialize , Serializer } ;
1610use std:: cell:: RefCell ;
1711#[ cfg( not( any( feature = "force-inprocess" , target_os = "android" , target_os = "ios" ) ) ) ]
1812use std:: env;
19- use std:: iter;
13+ #[ cfg( not( any(
14+ feature = "force-inprocess" ,
15+ target_os = "android" ,
16+ target_os = "ios" ,
17+ target_os = "windows" ,
18+ ) ) ) ]
19+ use std:: io:: Error ;
2020#[ cfg( not( any( feature = "force-inprocess" , target_os = "android" , target_os = "ios" , ) ) ) ]
2121use std:: process:: { self , Command , Stdio } ;
2222#[ cfg( not( any(
@@ -27,7 +27,11 @@ use std::process::{self, Command, Stdio};
2727) ) ) ]
2828use std:: ptr;
2929use std:: rc:: Rc ;
30- use std:: thread;
30+ use std:: time:: { Duration , Instant } ;
31+ use std:: { iter, thread} ;
32+
33+ use crossbeam_channel:: { self , Sender } ;
34+ use serde:: { Deserialize , Deserializer , Serialize , Serializer } ;
3135
3236#[ cfg( not( any(
3337 feature = "force-inprocess" ,
@@ -36,15 +40,10 @@ use std::thread;
3640 target_os = "windows"
3741) ) ) ]
3842use crate :: ipc:: IpcOneShotServer ;
39-
40- #[ cfg( not( any(
41- feature = "force-inprocess" ,
42- target_os = "android" ,
43- target_os = "ios" ,
44- target_os = "windows" ,
45- ) ) ) ]
46- use std:: io:: Error ;
47- use std:: time:: { Duration , Instant } ;
43+ #[ cfg( not( any( feature = "force-inprocess" , target_os = "android" , target_os = "ios" ) ) ) ]
44+ use crate :: ipc:: IpcReceiver ;
45+ use crate :: ipc:: { self , IpcReceiverSet , IpcSender , IpcSharedMemory } ;
46+ use crate :: router:: { RouterProxy , ROUTER } ;
4847
4948#[ cfg( not( any(
5049 feature = "force-inprocess" ,
@@ -340,6 +339,12 @@ fn router_flood() {
340339 }
341340}
342341
342+ #[ test]
343+ fn router_shutdown ( ) {
344+ let router = RouterProxy :: new ( ) ;
345+ router. shutdown ( ) ;
346+ }
347+
343348#[ test]
344349fn router_routing_to_new_crossbeam_receiver ( ) {
345350 let person = ( "Patrick Walton" . to_owned ( ) , 29 ) ;
@@ -722,10 +727,10 @@ fn transfer_closed_sender() {
722727#[ cfg( feature = "async" ) ]
723728#[ test]
724729fn test_receiver_stream ( ) {
725- use futures_core:: task:: Context ;
726- use futures_core:: task:: Poll ;
727- use futures_core:: Stream ;
728730 use std:: pin:: Pin ;
731+
732+ use futures_core:: task:: { Context , Poll } ;
733+ use futures_core:: Stream ;
729734 let ( tx, rx) = ipc:: channel ( ) . unwrap ( ) ;
730735 let ( waker, count) = futures_test:: task:: new_count_waker ( ) ;
731736 let mut ctx = Context :: from_waker ( & waker) ;
0 commit comments