diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-03-22 00:45:41 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-03-23 09:45:19 -0700 |
| commit | dd64bd83b72a669a20d1b7d938f1ff76aceb0cef (patch) | |
| tree | c1988740d6ae11cebfba3a3a946c4311425db55a /src/libstd/comm | |
| parent | da118e88d5f5814e5a7fad4dbeb8cc125054c5da (diff) | |
| download | rust-dd64bd83b72a669a20d1b7d938f1ff76aceb0cef.tar.gz rust-dd64bd83b72a669a20d1b7d938f1ff76aceb0cef.zip | |
std: Move NativeMutex from &mut self to &self
The proper usage of shared types is now sharing through `&self` rather than `&mut self` because the mutable version will provide stronger guarantees (no aliasing on *any* thread).
Diffstat (limited to 'src/libstd/comm')
| -rw-r--r-- | src/libstd/comm/shared.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/comm/shared.rs b/src/libstd/comm/shared.rs index 8c8ae85e4ea..e8ba9d6e628 100644 --- a/src/libstd/comm/shared.rs +++ b/src/libstd/comm/shared.rs @@ -68,7 +68,7 @@ pub enum Failure { impl<T: Send> Packet<T> { // Creation of a packet *must* be followed by a call to inherit_blocker pub fn new() -> Packet<T> { - let mut p = Packet { + let p = Packet { queue: mpsc::Queue::new(), cnt: atomics::AtomicInt::new(0), steals: 0, |
