From 371f04d4330f70cfab5fa2a5fdb65df7ccd0604c Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 30 Dec 2014 18:05:17 -0500 Subject: std: unbox closures used in function arguments --- src/libstd/rt/task.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd/rt') diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs index 773322e4f57..41e91d1b6ef 100644 --- a/src/libstd/rt/task.rs +++ b/src/libstd/rt/task.rs @@ -174,7 +174,7 @@ impl Task { /// /// It is invalid to call this function with a thread that has been previously /// destroyed via a failed call to `run`. - pub fn run(mut self: Box, f: ||) -> Box { + pub fn run(mut self: Box, f: F) -> Box where F: FnOnce() { assert!(!self.is_destroyed(), "cannot re-use a destroyed thread"); // First, make sure that no one else is in TLS. This does not allow -- cgit 1.4.1-3-g733a5