1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-15 22:00:26 +02:00

Fix slices immutable example (#686)

This commit is contained in:
Gershon Papi
2023-06-06 12:17:55 +03:00
committed by GitHub
parent c0f84d0864
commit 305bdbb29a

View File

@ -4,7 +4,7 @@ A slice gives you a view into a larger collection:
```rust,editable
fn main() {
let a: [i32; 6] = [10, 20, 30, 40, 50, 60];
let mut a: [i32; 6] = [10, 20, 30, 40, 50, 60];
println!("a: {a:?}");
let s: &[i32] = &a[2..4];