]> git.lizzy.rs Git - rust.git/commitdiff
tutorial: Add missing struct name
authorJacob Harris Cryer Kragh <jhckragh@gmail.com>
Sat, 6 Oct 2012 08:56:29 +0000 (11:56 +0300)
committerBrian Anderson <banderson@mozilla.com>
Sun, 7 Oct 2012 05:33:09 +0000 (22:33 -0700)
doc/tutorial.md

index f73ddd1b4c46537e054db32845ce3fb809b7023e..0badbb8c05daf40b9a9d34c4f96dd3d2218a4b4a 100644 (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}
     }
 }
 ~~~~