Skip to content

Instantly share code, notes, and snippets.

@astocko
Created June 18, 2016 16:42
Show Gist options
  • Save astocko/d75ba6afbd327ed82d5fbdcbdf062d01 to your computer and use it in GitHub Desktop.
Save astocko/d75ba6afbd327ed82d5fbdcbdf062d01 to your computer and use it in GitHub Desktop.
#![crate_type = "lib"]
pub fn increment(data: &mut u32, next: fn() -> usize) -> usize {
*data += 1;
next()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment