diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2012-12-11 13:43:14 -0800 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2012-12-11 13:43:14 -0800 |
| commit | 645bd98b602500ef910685eeeb899df298221e35 (patch) | |
| tree | 23740cdaaf1345737e11f1ea93efc4bc785a6c2b | |
| parent | fb498ff59f3de4da58d9f6e90fd989482c901fc5 (diff) | |
| download | rust-645bd98b602500ef910685eeeb899df298221e35.tar.gz rust-645bd98b602500ef910685eeeb899df298221e35.zip | |
doc: add missing decls to example, r=burningtree.
| -rw-r--r-- | doc/tutorial.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/tutorial.md b/doc/tutorial.md index b58ba6c3222..b7a07f4021a 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<T>` instead of `T`. ~~~~ +# struct Point {x: float, y: float} +# enum Shape { Circle(Point, float), Rectangle(Point, Point) } fn radius(shape: Shape) -> Option<float> { match shape { Circle(_, radius) => Some(radius), |
