Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created August 11, 2020 23:07
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rust-play/b28257cd7c48d0f9e9b1893181aa99bc to your computer and use it in GitHub Desktop.
Save rust-play/b28257cd7c48d0f9e9b1893181aa99bc to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
fn foo(opt: impl Into<Option<i32>>) {
}
fn bar() {
foo(Some(12));
foo(12);
foo(None);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment