about summary refs log tree commit diff
path: root/src/libstd/io/native
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-11-18 21:15:42 -0800
committerPatrick Walton <pcwalton@mimiga.net>2013-11-19 12:40:19 -0800
commit1946265e1a1a32eb922846f314657a4aa7eb1d23 (patch)
tree4b83f81bf1b265933a13605d9d35eab67a34ea8d /src/libstd/io/native
parenteef913b290f668b4f131ead5be65a1615616426b (diff)
downloadrust-1946265e1a1a32eb922846f314657a4aa7eb1d23.tar.gz
rust-1946265e1a1a32eb922846f314657a4aa7eb1d23.zip
libstd: Change all uses of `&fn(A)->B` over to `|A|->B` in libstd
Diffstat (limited to 'src/libstd/io/native')
-rw-r--r--src/libstd/io/native/file.rs2
-rw-r--r--src/libstd/io/native/process.rs8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/io/native/file.rs b/src/libstd/io/native/file.rs
index b2cb8f735cf..abaeab609aa 100644
--- a/src/libstd/io/native/file.rs
+++ b/src/libstd/io/native/file.rs
@@ -33,7 +33,7 @@ use vec;
 #[cfg(windows)] use ptr;
 #[cfg(windows)] use str;
 
-fn keep_going(data: &[u8], f: &fn(*u8, uint) -> i64) -> i64 {
+fn keep_going(data: &[u8], f: |*u8, uint| -> i64) -> i64 {
     #[cfg(windows)] static eintr: int = 0; // doesn't matter
     #[cfg(not(windows))] static eintr: int = libc::EINTR as int;
 
diff --git a/src/libstd/io/native/process.rs b/src/libstd/io/native/process.rs
index 71c6ce78a1e..6aa3ae65fc9 100644
--- a/src/libstd/io/native/process.rs
+++ b/src/libstd/io/native/process.rs
@@ -432,7 +432,7 @@ fn spawn_process_os(prog: &str, args: &[~str],
 }
 
 #[cfg(unix)]
-fn with_argv<T>(prog: &str, args: &[~str], cb: &fn(**libc::c_char) -> T) -> T {
+fn with_argv<T>(prog: &str, args: &[~str], cb: |**libc::c_char| -> T) -> T {
     use vec;
 
     // We can't directly convert `str`s into `*char`s, as someone needs to hold
@@ -460,7 +460,7 @@ fn with_argv<T>(prog: &str, args: &[~str], cb: &fn(**libc::c_char) -> T) -> T {
 }
 
 #[cfg(unix)]
-fn with_envp<T>(env: Option<~[(~str, ~str)]>, cb: &fn(*c_void) -> T) -> T {
+fn with_envp<T>(env: Option<~[(~str, ~str)]>, cb: |*c_void| -> T) -> T {
     use vec;
 
     // On posixy systems we can pass a char** for envp, which is a
@@ -490,7 +490,7 @@ fn with_envp<T>(env: Option<~[(~str, ~str)]>, cb: &fn(*c_void) -> T) -> T {
 }
 
 #[cfg(windows)]
-fn with_envp<T>(env: Option<~[(~str, ~str)]>, cb: &fn(*mut c_void) -> T) -> T {
+fn with_envp<T>(env: Option<~[(~str, ~str)]>, cb: |*mut c_void| -> T) -> T {
     // On win32 we pass an "environment block" which is not a char**, but
     // rather a concatenation of null-terminated k=v\0 sequences, with a final
     // \0 to terminate.
@@ -514,7 +514,7 @@ fn with_envp<T>(env: Option<~[(~str, ~str)]>, cb: &fn(*mut c_void) -> T) -> T {
     }
 }
 
-fn with_dirp<T>(d: Option<&Path>, cb: &fn(*libc::c_char) -> T) -> T {
+fn with_dirp<T>(d: Option<&Path>, cb: |*libc::c_char| -> T) -> T {
     match d {
       Some(dir) => dir.with_c_str(|buf| cb(buf)),
       None => cb(ptr::null())