mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-02-20 15:49:33 +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
|
```rust,editable
|
||||||
fn main() {
|
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:?}");
|
println!("a: {a:?}");
|
||||||
|
|
||||||
let s: &[i32] = &a[2..4];
|
let s: &[i32] = &a[2..4];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user