From 645bd98b602500ef910685eeeb899df298221e35 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Tue, 11 Dec 2012 13:43:14 -0800 Subject: [PATCH] doc: add missing decls to example, r=burningtree. --- doc/tutorial.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/tutorial.md b/doc/tutorial.md index b58ba6c3222e..b7a07f4021a5 100644 --- a/doc/tutorial.md +++ b/doc/tutorial.md @@ -1838,6 +1838,8 @@ combination of arguments of the appropriate types. The usual way is to write a function that returns `Option` instead of `T`. ~~~~ +# struct Point {x: float, y: float} +# enum Shape { Circle(Point, float), Rectangle(Point, Point) } fn radius(shape: Shape) -> Option { match shape { Circle(_, radius) => Some(radius),