mirror of
https://github.com/Noratrieb/blog.git
synced 2026-01-14 12:35:00 +01:00
Update item-patterns-and-struct-else.md
This commit is contained in:
parent
47f40f231a
commit
cb46b7fb71
1 changed files with 1 additions and 1 deletions
|
|
@ -162,7 +162,7 @@ struct Household { parent: Ferris, child: Corro } = Household {
|
||||||
Now we can nicely match on the `Household` struct containing the definition of the `Ferris` and `Corro` structs. This is equivalent to the following code:
|
Now we can nicely match on the `Household` struct containing the definition of the `Ferris` and `Corro` structs. This is equivalent to the following code:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
struct Feris {
|
struct Ferris {
|
||||||
name: String,
|
name: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue