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(); });