do-notation icon indicating copy to clipboard operation
do-notation copied to clipboard

support mut in bindings

Open bbarker opened this issue 1 year ago • 3 comments
trafficstars

I may be missing it but it seems like you can't current do something like:

mut state <- ...;

As it results in an error like:

32  |             mut state <- ...;
    |                 ^^^^^ no rules expected this token in macro call
    |

bbarker avatar Dec 16 '23 18:12 bbarker

I guess the workaround is fairly trivial though, just an extra line of code:

state <- ...;
let mut state = state;

bbarker avatar Dec 16 '23 18:12 bbarker

Yeah, a PR to fix that should be fairly simple, I think. :)

hadronized avatar Dec 19 '23 14:12 hadronized

Thanks, sounds good - I will take a look when I get some time.

bbarker avatar Dec 19 '23 14:12 bbarker