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:
parent
c0f84d0864
commit
305bdbb29a
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user