Ownership scope fun

This commit is contained in:
Dan Buch 2017-12-27 13:04:51 -05:00
parent c49281b26d
commit eace2dafe4
Signed by: meatballhat
GPG Key ID: 9685130D8B763EA7
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,6 @@
[package]
name = "ownership"
version = "0.1.0"
authors = ["Dan Buch <daniel.buch@gmail.com>"]
[dependencies]

View File

@ -0,0 +1,9 @@
fn main() {
{
let mut s = String::from("hello");
s.push_str(", world!");
println!("{}", s);
}
}