]> git.lizzy.rs Git - rust.git/blobdiff - src/libsync/comm/mod.rs
rollup merge of #17355 : gamazeps/issue17210
[rust.git] / src / libsync / comm / mod.rs
index e46f52b3ad7b97dfea5438c787fb6c7fc06ae23c..4e66dd69a607b932d357d04843d6a92293520402 100644 (file)
@@ -654,7 +654,7 @@ pub fn send_opt(&self, t: T) -> Result<(), T> {
 
         unsafe {
             let tmp = Sender::new(Stream(new_inner));
-            mem::swap(self.mut_inner(), tmp.mut_inner());
+            mem::swap(self.inner_mut(), tmp.inner_mut());
         }
         return ret;
     }
@@ -695,7 +695,7 @@ fn clone(&self) -> Sender<T> {
             (*packet.get()).inherit_blocker(sleeper);
 
             let tmp = Sender::new(Shared(packet.clone()));
-            mem::swap(self.mut_inner(), tmp.mut_inner());
+            mem::swap(self.inner_mut(), tmp.inner_mut());
         }
         Sender::new(Shared(packet))
     }
@@ -704,7 +704,7 @@ fn clone(&self) -> Sender<T> {
 #[unsafe_destructor]
 impl<T: Send> Drop for Sender<T> {
     fn drop(&mut self) {
-        match *unsafe { self.mut_inner() } {
+        match *unsafe { self.inner_mut() } {
             Oneshot(ref mut p) => unsafe { (*p.get()).drop_chan(); },
             Stream(ref mut p) => unsafe { (*p.get()).drop_chan(); },
             Shared(ref mut p) => unsafe { (*p.get()).drop_chan(); },
@@ -895,8 +895,8 @@ pub fn try_recv(&self) -> Result<T, TryRecvError> {
                 }
             };
             unsafe {
-                mem::swap(self.mut_inner(),
-                          new_port.mut_inner());
+                mem::swap(self.inner_mut(),
+                          new_port.inner_mut());
             }
         }
     }
@@ -943,7 +943,7 @@ pub fn recv_opt(&self) -> Result<T, ()> {
                 Sync(ref p) => return unsafe { (*p.get()).recv() }
             };
             unsafe {
-                mem::swap(self.mut_inner(), new_port.mut_inner());
+                mem::swap(self.inner_mut(), new_port.inner_mut());
             }
         }
     }
@@ -980,8 +980,8 @@ fn can_recv(&self) -> bool {
                 }
             };
             unsafe {
-                mem::swap(self.mut_inner(),
-                          new_port.mut_inner());
+                mem::swap(self.inner_mut(),
+                          new_port.inner_mut());
             }
         }
     }
@@ -1012,8 +1012,8 @@ fn start_selection(&self, mut task: BlockedTask) -> Result<(), BlockedTask>{
             };
             task = t;
             unsafe {
-                mem::swap(self.mut_inner(),
-                          new_port.mut_inner());
+                mem::swap(self.inner_mut(),
+                          new_port.inner_mut());
             }
         }
     }
@@ -1036,8 +1036,8 @@ fn abort_selection(&self) -> bool {
             let new_port = match result { Ok(b) => return b, Err(p) => p };
             was_upgrade = true;
             unsafe {
-                mem::swap(self.mut_inner(),
-                          new_port.mut_inner());
+                mem::swap(self.inner_mut(),
+                          new_port.inner_mut());
             }
         }
     }
@@ -1051,7 +1051,7 @@ fn next(&mut self) -> Option<T> { self.rx.recv_opt().ok() }
 #[unsafe_destructor]
 impl<T: Send> Drop for Receiver<T> {
     fn drop(&mut self) {
-        match *unsafe { self.mut_inner() } {
+        match *unsafe { self.inner_mut() } {
             Oneshot(ref mut p) => unsafe { (*p.get()).drop_port(); },
             Stream(ref mut p) => unsafe { (*p.get()).drop_port(); },
             Shared(ref mut p) => unsafe { (*p.get()).drop_port(); },