Skip to content

Instantly share code, notes, and snippets.

@ebadiere
Created February 8, 2020 18:21
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 ebadiere/21fbe29e747398d79dc53dd375921b72 to your computer and use it in GitHub Desktop.
Save ebadiere/21fbe29e747398d79dc53dd375921b72 to your computer and use it in GitHub Desktop.
#![allow(unused_variables)]
fn main() {
let mut s = String::from("hello");
s.push_str(", world!"); // push_str() appends a literal to a String
println!("{}", s); // This will print `hello, world!`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment