diff --git a/src/language/object-maps-oop.md b/src/language/object-maps-oop.md index 0284d094..90f1223c 100644 --- a/src/language/object-maps-oop.md +++ b/src/language/object-maps-oop.md @@ -22,7 +22,7 @@ as a method call on the [object map] itself. ```rust let obj = #{ data: 40, - action: || this.data += x // 'action' holds a closure + action: |x| this.data += x // 'action' holds a closure }; obj.action(2); // calls the function pointer with 'this' bound to 'obj'