From bdfaf04bd507bf99cff392c0a0c2df65ede96f69 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Thu, 21 Nov 2013 21:30:34 -0800 Subject: Move mutable::Mut to cell::RefCell --- src/libstd/rt/comm.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/libstd/rt') diff --git a/src/libstd/rt/comm.rs b/src/libstd/rt/comm.rs index 7441d0d3edc..8635f9372c4 100644 --- a/src/libstd/rt/comm.rs +++ b/src/libstd/rt/comm.rs @@ -25,10 +25,9 @@ use unstable::sync::UnsafeArc; use util; use util::Void; use comm::{GenericChan, GenericSmartChan, GenericPort, Peekable, SendDeferred}; -use cell::Cell; +use cell::{Cell, RefCell}; use clone::Clone; use tuple::ImmutableTuple; -use mutable::Mut; /// A combined refcount / BlockedTask-as-uint pointer. /// @@ -433,20 +432,20 @@ type StreamPortOne = PortOne>; /// A channel with unbounded size. pub struct Chan { - // FIXME #5372. Using Mut because we don't take &mut self - next: Mut> + // FIXME #5372. Using RefCell because we don't take &mut self + next: RefCell> } /// An port with unbounded size. pub struct Port { - // FIXME #5372. Using Mut because we don't take &mut self - next: Mut>> + // FIXME #5372. Using RefCell because we don't take &mut self + next: RefCell>> } pub fn stream() -> (Port, Chan) { let (pone, cone) = oneshot(); - let port = Port { next: Mut::new(Some(pone)) }; - let chan = Chan { next: Mut::new(cone) }; + let port = Port { next: RefCell::new(Some(pone)) }; + let chan = Chan { next: RefCell::new(cone) }; return (port, chan); } -- cgit 1.4.1-3-g733a5