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]
|
#[bench]
|
||||||
fn swap(b: &mut test::Bencher) {
|
fn swap(b: &mut test::Bencher) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut ctx = Context::new(move |:| {
|
let mut ctx = Context::new(move || {
|
||||||
let ctx_ptr = ctx_slot;
|
let ctx_ptr = ctx_slot;
|
||||||
loop {
|
loop {
|
||||||
(*ctx_ptr).swap()
|
(*ctx_ptr).swap()
|
||||||
|
|
|
@ -7,7 +7,7 @@ static mut ctx_slot: *mut Context = 0 as *mut Context;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut ctx = Context::new(move |:| {
|
let mut ctx = Context::new(move || {
|
||||||
println!("it's alive!");
|
println!("it's alive!");
|
||||||
(*ctx_slot).swap();
|
(*ctx_slot).swap();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue