Playing with stack and heap copying

cat-town
Dan Buch 6 years ago
parent 5a74a5dc01
commit f9bbf54552
Signed by: meatballhat
GPG Key ID: 9685130D8B763EA7

@ -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();

Loading…
Cancel
Save