summary refs log tree commit diff
path: root/src/libstd/os.rs
diff options
context:
space:
mode:
authorBen Blum <bblum@andrew.cmu.edu>2013-06-21 20:08:35 -0400
committerBen Blum <bblum@andrew.cmu.edu>2013-06-29 04:39:34 -0400
commitff4ab9e147b0be4126b8b70ca6ab27173a46077a (patch)
treef028c640cd8a3efd7f8ec5661ba255d269250dbe /src/libstd/os.rs
parent89110fdf55c000096fc24a78d35256544c7b523f (diff)
downloadrust-ff4ab9e147b0be4126b8b70ca6ab27173a46077a.tar.gz
rust-ff4ab9e147b0be4126b8b70ca6ab27173a46077a.zip
'Borrow' stack closures rather than copying them (e.g., "|x|f(x)"), in prep for making them noncopyable.
Diffstat (limited to 'src/libstd/os.rs')
-rw-r--r--src/libstd/os.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/os.rs b/src/libstd/os.rs
index 400a93ee28f..1fbcda12dce 100644
--- a/src/libstd/os.rs
+++ b/src/libstd/os.rs
@@ -595,7 +595,7 @@ pub fn walk_dir(p: &Path, f: &fn(&Path) -> bool) -> bool {
     let r = list_dir(p);
     r.iter().advance(|q| {
         let path = &p.push(*q);
-        f(path) && (!path_is_dir(path) || walk_dir(path, f))
+        f(path) && (!path_is_dir(path) || walk_dir(path, |p| f(p)))
     })
 }