File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -537,28 +537,28 @@ impl OsOpaqueIpcChannel {
537537}
538538
539539pub struct OsIpcReceiverSet {
540- port : Cell < mach_port_t > ,
540+ port : mach_port_t ,
541541 ports : Vec < mach_port_t > ,
542542}
543543
544544impl OsIpcReceiverSet {
545545 pub fn new ( ) -> Result < OsIpcReceiverSet , MachError > {
546546 let port = try!( mach_port_allocate ( MACH_PORT_RIGHT_PORT_SET ) ) ;
547547 Ok ( OsIpcReceiverSet {
548- port : Cell :: new ( port) ,
548+ port : port,
549549 ports : vec ! [ ] ,
550550 } )
551551 }
552552
553553 pub fn add ( & mut self , receiver : OsIpcReceiver ) -> Result < u64 , MachError > {
554- mach_port_move_member ( receiver. extract_port ( ) , self . port . get ( ) ) ?;
554+ mach_port_move_member ( receiver. extract_port ( ) , self . port ) ?;
555555 let receiver_port = receiver. consume_port ( ) ;
556556 self . ports . push ( receiver_port) ;
557557 Ok ( receiver_port as u64 )
558558 }
559559
560560 pub fn select ( & mut self ) -> Result < Vec < OsIpcSelectionResult > , MachError > {
561- select ( self . port . get ( ) , BlockingMode :: Blocking ) . map ( |result| vec ! [ result] )
561+ select ( self . port , BlockingMode :: Blocking ) . map ( |result| vec ! [ result] )
562562 }
563563}
564564
@@ -567,7 +567,7 @@ impl Drop for OsIpcReceiverSet {
567567 for port in & self . ports {
568568 mach_port_mod_release ( * port, MACH_PORT_RIGHT_RECEIVE ) . unwrap ( ) ;
569569 }
570- mach_port_mod_release ( self . port . get ( ) , MACH_PORT_RIGHT_PORT_SET ) . unwrap ( ) ;
570+ mach_port_mod_release ( self . port , MACH_PORT_RIGHT_PORT_SET ) . unwrap ( ) ;
571571 }
572572}
573573
You can’t perform that action at this time.
0 commit comments