diff options
| author | Alex Burka <durka42+github@gmail.com> | 2016-04-28 01:20:54 -0400 |
|---|---|---|
| committer | Alex Burka <durka42+github@gmail.com> | 2016-04-28 01:20:54 -0400 |
| commit | a14df5cc64053beabc03ceb5b6b1352cb48d166c (patch) | |
| tree | 59cce281d1a2e3bed08c3bd87801ea69e0a6c6fd /src/doc | |
| parent | 993f13a2cf125610dc6a34bf68aa6afd87a723d6 (diff) | |
| download | rust-a14df5cc64053beabc03ceb5b6b1352cb48d166c.tar.gz rust-a14df5cc64053beabc03ceb5b6b1352cb48d166c.zip | |
fix Point destructuring example
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/book/structs.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/book/structs.md b/src/doc/book/structs.md index 404eac25308..44a6d282c00 100644 --- a/src/doc/book/structs.md +++ b/src/doc/book/structs.md @@ -176,7 +176,7 @@ The members of a tuple struct may be accessed by dot notation or destructuring # let black = Color(0, 0, 0); # let origin = Point(0, 0, 0); let black_r = black.0; -let (_, origin_y, origin_z) = origin; +let Point(_, origin_y, origin_z) = origin; ``` One case when a tuple struct is very useful is when it has only one element. |
