Skip to content

Instantly share code, notes, and snippets.

Created November 24, 2016 09:38
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 anonymous/3e3ed3d515a56ea9f3b7f6e052ab857d to your computer and use it in GitHub Desktop.
Save anonymous/3e3ed3d515a56ea9f3b7f6e052ab857d to your computer and use it in GitHub Desktop.
Shared via Rust Playground
fn into_vec<T: Into<Vec<u8>>>(t: T) {
println!("{:?}", t.into());
}
fn main() {
into_vec("hello world".to_string());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment