about summary refs log tree commit diff
path: root/src/libstd/task.rs
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2014-12-07 14:15:25 -0500
committerJorge Aparicio <japaricious@gmail.com>2014-12-13 17:03:47 -0500
commitcdbb3ca9b776b066e2c93acfb60da8537d2b1c9b (patch)
tree18a305205c51df4501a5e5e73c4b275242fb5a25 /src/libstd/task.rs
parentbe53d619f874cbe8e4d87f900060561d16405d53 (diff)
downloadrust-cdbb3ca9b776b066e2c93acfb60da8537d2b1c9b.tar.gz
rust-cdbb3ca9b776b066e2c93acfb60da8537d2b1c9b.zip
libstd: use unboxed closures
Diffstat (limited to 'src/libstd/task.rs')
-rw-r--r--src/libstd/task.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstd/task.rs b/src/libstd/task.rs
index c91417e611e..5a1a5b4fb7a 100644
--- a/src/libstd/task.rs
+++ b/src/libstd/task.rs
@@ -381,7 +381,9 @@ mod test {
         rx.recv();
     }
 
-    fn avoid_copying_the_body(spawnfn: |v: proc():Send|) {
+    fn avoid_copying_the_body<F>(spawnfn: F) where
+        F: FnOnce(proc():Send),
+    {
         let (tx, rx) = channel::<uint>();
 
         let x = box 1;