Playing with stack and heap copying
This commit is contained in:
parent
5a74a5dc01
commit
f9bbf54552
@ -1,4 +1,9 @@
|
|||||||
fn main() {
|
fn main() {
|
||||||
|
let x = 5;
|
||||||
|
let y = x;
|
||||||
|
|
||||||
|
println!("x = {}, y = {}", x, y);
|
||||||
|
|
||||||
let s1 = String::from("hello");
|
let s1 = String::from("hello");
|
||||||
let s2 = s1.clone();
|
let s2 = s1.clone();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user