Skip to content

Instantly share code, notes, and snippets.

@rust-play
Created October 18, 2019 00:47
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/2f4590a33066894f43c137627642bf27 to your computer and use it in GitHub Desktop.
Save rust-play/2f4590a33066894f43c137627642bf27 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
fn main() {
let mut v: Vec<u8> = Vec::new();
let one: &[u8] = "hello".as_bytes();
let two: &[u8] = "world".as_bytes();
v.extend(one);
v.extend(two);
dbg!(v);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment