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/io/stdio.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstd/io') diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 43d2e078035..b7d069eb19e 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -334,7 +334,7 @@ pub fn set_stderr(stderr: Box) -> Option> { // // io1 aliases io2 // }) // }) -fn with_task_stdout(f: |&mut Writer| -> IoResult<()>) { +fn with_task_stdout(f: F) where F: FnOnce(&mut Writer) -> IoResult<()> { let mut my_stdout = LOCAL_STDOUT.with(|slot| { slot.borrow_mut().take() }).unwrap_or_else(|| { -- cgit 1.4.1-3-g733a5