tutorial: Add missing struct name
This commit is contained in:
parent
d5d7741247
commit
0b2ffa5692
1 changed files with 4 additions and 4 deletions
|
@ -879,10 +879,10 @@ parentheses.
|
||||||
# enum Direction { North, East, South, West }
|
# enum Direction { North, East, South, West }
|
||||||
fn point_from_direction(dir: Direction) -> Point {
|
fn point_from_direction(dir: Direction) -> Point {
|
||||||
match dir {
|
match dir {
|
||||||
North => {x: 0f, y: 1f},
|
North => Point {x: 0f, y: 1f},
|
||||||
East => {x: 1f, y: 0f},
|
East => Point {x: 1f, y: 0f},
|
||||||
South => {x: 0f, y: -1f},
|
South => Point {x: 0f, y: -1f},
|
||||||
West => {x: -1f, y: 0f}
|
West => Point {x: -1f, y: 0f}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
~~~~
|
~~~~
|
||||||
|
|
Loading…
Add table
Reference in a new issue