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

Update destructuring-arrays.md (#369)

* Update destructuring-arrays.md

* Update destructuring-arrays.md
This commit is contained in:
Charisee Chiw
2023-02-09 13:17:33 -08:00
committed by GitHub
parent 6a1282c166
commit cf931075d5

View File

@ -8,7 +8,7 @@ You can destructure arrays, tuples, and slices by matching on their elements:
<details>
Destructuring of slices of unknown length also works with patterns of fixed length.
* Destructuring of slices of unknown length also works with patterns of fixed length.
```rust,editable
fn main() {
@ -26,5 +26,5 @@ fn inspect(slice: &[i32]) {
}
}
```
* Show matching against the tail with patterns `[.., b]` and `[a@..,b]`
</details>