Skip to content

Commit 3e58596

Browse files
committed
update slice2
1 parent cee2e2f commit 3e58596

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_slices2/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
fn main() {
22
let a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
33
let slice = &a[0..3];
4-
println!("{:?}", slice);
4+
println!(" Nous somme dans la fonction main {:?}", slice);
55
let sum = print_slice(&a);
66
}
77

88

99
fn print_slice(sliced : &[i32] ) {
1010
let lenght = sliced.len();
11-
println!("Length of the slice is {}", lenght);
11+
println!("Nous somme dans la fonction print slice {}", lenght);
1212

1313
}

0 commit comments

Comments
 (0)