Created
October 18, 2019 00:47
-
-
Save rust-play/2f4590a33066894f43c137627642bf27 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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