Playing with stack and heap copying

This commit is contained in:
Dan Buch
2017-12-30 08:03:47 -05:00
parent 5a74a5dc01
commit f9bbf54552

View File

@@ -1,4 +1,9 @@
fn main() {
let x = 5;
let y = x;
println!("x = {}, y = {}", x, y);
let s1 = String::from("hello");
let s2 = s1.clone();