Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created August 20, 2019 23:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rust-play/b6d91a3f596e17d6a9bc5f581ac648cd to your computer and use it in GitHub Desktop.
Save rust-play/b6d91a3f596e17d6a9bc5f581ac648cd to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
type F = dyn FnMut();
pub fn g(_f: &mut F) {}
pub fn test(f: &mut F) {
g(&mut || f())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment