From dd64bd83b72a669a20d1b7d938f1ff76aceb0cef Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Sat, 22 Mar 2014 00:45:41 -0700 Subject: 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). --- src/libnative/io/timer_helper.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libnative/io') diff --git a/src/libnative/io/timer_helper.rs b/src/libnative/io/timer_helper.rs index c5b6705ceaa..e5f70c4e4b3 100644 --- a/src/libnative/io/timer_helper.rs +++ b/src/libnative/io/timer_helper.rs @@ -75,7 +75,7 @@ pub fn send(req: Req) { fn shutdown() { // Request a shutdown, and then wait for the task to exit unsafe { - let mut guard = TIMER_HELPER_EXIT.lock(); + let guard = TIMER_HELPER_EXIT.lock(); send(Shutdown); guard.wait(); drop(guard); -- cgit 1.4.1-3-g733a5