@@ -56,7 +56,7 @@ pub struct Service {
5656 pub ( crate ) client_manager : ClientManager ,
5757 port : Rc < Cell < u16 > > ,
5858 public_key_fingerprint : String ,
59- notifies : Rc < Notifies > ,
59+ frontend_event_pending : Rc < Notify > ,
6060 pub ( crate ) config : Rc < Config > ,
6161 pending_frontend_events : Rc < RefCell < VecDeque < FrontendEvent > > > ,
6262 capture_status : Rc < Cell < Status > > ,
@@ -69,11 +69,6 @@ pub struct Service {
6969 next_trigger_handle : u64 ,
7070}
7171
72- #[ derive( Default ) ]
73- struct Notifies {
74- frontend_event_pending : Notify ,
75- }
76-
7772impl Service {
7873 pub async fn new ( config : Config ) -> Result < Self , ServiceError > {
7974 let client_manager = ClientManager :: default ( ) ;
@@ -106,8 +101,8 @@ impl Service {
106101 public_key_fingerprint,
107102 config : Rc :: new ( config) ,
108103 client_manager,
104+ frontend_event_pending : Default :: default ( ) ,
109105 port,
110- notifies : Default :: default ( ) ,
111106 pending_frontend_events : Rc :: new ( RefCell :: new ( VecDeque :: new ( ) ) ) ,
112107 capture_status : Default :: default ( ) ,
113108 emulation_status : Default :: default ( ) ,
@@ -222,7 +217,7 @@ impl Service {
222217 }
223218 }
224219 }
225- _ = self . notifies . frontend_event_pending. notified( ) => {
220+ _ = self . frontend_event_pending. notified( ) => {
226221 while let Some ( event) = {
227222 /* need to drop borrow before next iteration! */
228223 let event = self . pending_frontend_events. borrow_mut( ) . pop_front( ) ;
@@ -378,7 +373,7 @@ impl Service {
378373
379374 fn notify_frontend ( & self , event : FrontendEvent ) {
380375 self . pending_frontend_events . borrow_mut ( ) . push_back ( event) ;
381- self . notifies . frontend_event_pending . notify_one ( ) ;
376+ self . frontend_event_pending . notify_one ( ) ;
382377 }
383378
384379 pub ( crate ) fn client_updated ( & self , handle : ClientHandle ) {
0 commit comments