Skip to content

Commit 645bd98

Browse files
committed
doc: add missing decls to example, r=burningtree.
1 parent fb498ff commit 645bd98

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/tutorial.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1838,6 +1838,8 @@ combination of arguments of the appropriate types. The usual way is to write
18381838
a function that returns `Option<T>` instead of `T`.
18391839

18401840
~~~~
1841+
# struct Point {x: float, y: float}
1842+
# enum Shape { Circle(Point, float), Rectangle(Point, Point) }
18411843
fn radius(shape: Shape) -> Option<float> {
18421844
match shape {
18431845
Circle(_, radius) => Some(radius),

0 commit comments

Comments
 (0)