Skip to content

Commit a14df5c

Browse files
committed
fix Point destructuring example
1 parent 993f13a commit a14df5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/book/structs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ The members of a tuple struct may be accessed by dot notation or destructuring
176176
# let black = Color(0, 0, 0);
177177
# let origin = Point(0, 0, 0);
178178
let black_r = black.0;
179-
let (_, origin_y, origin_z) = origin;
179+
let Point(_, origin_y, origin_z) = origin;
180180
```
181181

182182
One case when a tuple struct is very useful is when it has only one element.

0 commit comments

Comments
 (0)