mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-05-16 23:55:42 +02:00
Update destructuring-arrays.md (#369)
* Update destructuring-arrays.md * Update destructuring-arrays.md
This commit is contained in:
parent
6a1282c166
commit
cf931075d5
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user