1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-02-18 09:40:22 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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];