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

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>