diff options
| author | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-25 12:54:33 +0000 |
|---|---|---|
| committer | Zuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian> | 2026-01-25 12:54:33 +0000 |
| commit | 7fea57bdddde04090cc95112b47d0a1a86c341bc (patch) | |
| tree | 38b2f22583aff0af6f384f1b91accfd1bba7dc23 /README.md | |
| parent | eae6d2a789f6538806a3859a144e99558d3e6caf (diff) | |
Fix for #123
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 => {} } |
