forked from M-Labs/libfringe
closure syntax changed
This commit is contained in:
parent
e51cfa1b7b
commit
8515bf0fa1
@ -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()
|
||||
|
@ -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();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user