summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index c6ed5d5..9159ea2 100644
--- a/README.md
+++ b/README.md
@@ -362,9 +362,9 @@ match val {
// Destructuring Enums
match shape {
- Circle(r) => print(f"Radius: {r}"),
- Rect(w, h) => print(f"Area: {w*h}"),
- Point => print("Point")
+ Shape::Circle(r) => println "Radius: {r}",
+ Shape::Rect(w, h) => println "Area: {w*h}",
+ Shape::Point => println "Point"
}
```
@@ -377,7 +377,7 @@ match opt {
Some(ref x) => {
// 'x' is a pointer to the value inside 'opt'
// 'opt' is NOT moved/consumed here
- print(x.field);
+ println "{x.field}";
},
None => {}
}