Ownership scope fun
This commit is contained in:
9
rustbook/ownership/src/main.rs
Normal file
9
rustbook/ownership/src/main.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
fn main() {
|
||||
{
|
||||
let mut s = String::from("hello");
|
||||
|
||||
s.push_str(", world!");
|
||||
|
||||
println!("{}", s);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user