Skip to content

Instantly share code, notes, and snippets.

@killerswan
Created August 23, 2012 20:05
Show Gist options
  • Save killerswan/3440976 to your computer and use it in GitHub Desktop.
Save killerswan/3440976 to your computer and use it in GitHub Desktop.
an example && to replace (with ICE)
// Call o.fsync after executing blk
fn obj_sync(&&o: FSyncable, opt_level: option<Level>, /* ICE if I change this... */
blk: fn(&&Res<FSyncable>)) {
blk(Res({
val: o, opt_level: opt_level,
fsync_fn: fn@(&&o: FSyncable, l: Level) -> int {
return o.fsync(l);
}
}));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment