You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-06-15 13:50:27 +02:00
Minor fixes (#579)
* order the Cat and Dog correctly in the vec * make example editable * patterns: capture vs. constant * clarify notes on indexing a string
This commit is contained in:
committed by
GitHub
parent
4266078684
commit
6744822454
@ -9,4 +9,8 @@ You can also destructure `structs`:
|
||||
|
||||
* Change the literal values in `foo` to match with the other patterns.
|
||||
* Add a new field to `Foo` and make changes to the pattern as needed.
|
||||
* The distinction between a capture and a constant expression can be hard to
|
||||
spot. Try changing the `2` in the second arm to a variable, and see that it subtly
|
||||
doesn't work. Change it to a `const` and see it working again.
|
||||
|
||||
</details>
|
||||
|
Reference in New Issue
Block a user