copy trait

This commit is contained in:
2023-07-03 17:43:20 +02:00
parent fd3dd1845e
commit 40ceace587
5 changed files with 38 additions and 0 deletions

9
copiari32/src/main.rs Normal file
View File

@@ -0,0 +1,9 @@
fn incrementar(n: i32) -> i32 {
n + 32
}
fn main() {
let num = 10i32;
let num2 = incrementar(num);
println!("num: {}, num2: {}", num, num2);
}