tutorial: Add missing struct name

This commit is contained in:
Jacob Harris Cryer Kragh 2012-10-06 11:56:29 +03:00 committed by Brian Anderson
parent d5d7741247
commit 0b2ffa5692

View file

@ -879,10 +879,10 @@ parentheses.
# enum Direction { North, East, South, West }
fn point_from_direction(dir: Direction) -> Point {
match dir {
North => {x: 0f, y: 1f},
East => {x: 1f, y: 0f},
South => {x: 0f, y: -1f},
West => {x: -1f, y: 0f}
North => Point {x: 0f, y: 1f},
East => Point {x: 1f, y: 0f},
South => Point {x: 0f, y: -1f},
West => Point {x: -1f, y: 0f}
}
}
~~~~