libstd: Change all uses of &fn(A)->B over to |A|->B in libstd

This commit is contained in:
Patrick Walton
2013-11-18 21:15:42 -08:00
parent eef913b290
commit 1946265e1a
58 changed files with 270 additions and 236 deletions

View File

@@ -153,10 +153,9 @@ pub mod dl {
dlopen(ptr::null(), Lazy as libc::c_int)
}
pub fn check_for_errors_in<T>(f: &fn()->T) -> Result<T, ~str> {
pub fn check_for_errors_in<T>(f: || -> T) -> Result<T, ~str> {
use unstable::mutex::{Mutex, MUTEX_INIT};
static mut lock: Mutex = MUTEX_INIT;
unsafe {
// dlerror isn't thread safe, so we need to lock around this entire
// sequence. `atomically` asserts that we don't do anything that
@@ -225,7 +224,7 @@ pub mod dl {
handle
}
pub fn check_for_errors_in<T>(f: &fn()->T) -> Result<T, ~str> {
pub fn check_for_errors_in<T>(f: || -> T) -> Result<T, ~str> {
unsafe {
do atomically {
SetLastError(0);