From 8515bf0fa15a341ba6b6f5c3b9e602f6a3cf27d8 Mon Sep 17 00:00:00 2001 From: edef Date: Mon, 23 Feb 2015 23:14:58 -0500 Subject: [PATCH] closure syntax changed --- benches/swap.rs | 2 +- src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/benches/swap.rs b/benches/swap.rs index 227c107..18dbb1e 100644 --- a/benches/swap.rs +++ b/benches/swap.rs @@ -8,7 +8,7 @@ static mut ctx_slot: *mut Context = 0 as *mut Context; #[bench] fn swap(b: &mut test::Bencher) { unsafe { - let mut ctx = Context::new(move |:| { + let mut ctx = Context::new(move || { let ctx_ptr = ctx_slot; loop { (*ctx_ptr).swap() diff --git a/src/main.rs b/src/main.rs index e1cf924..af753a5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,7 +7,7 @@ static mut ctx_slot: *mut Context = 0 as *mut Context; fn main() { unsafe { - let mut ctx = Context::new(move |:| { + let mut ctx = Context::new(move || { println!("it's alive!"); (*ctx_slot).swap(); });