Reassigning values to a mutable array gives the following error

let mut _sections_deadline : [u64; 2] = [9999999, 9999999];

_sections_deadline[0] = 0;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ This expression is not valid on the left hand side of a reassignment.

This is the error I’m getting when I’m trying to change the value of the element at index 0 of this array.

Why so ?


What toolchain are you using? This compiles without any errors for me using the beta-3 toolchain.


Yes on beta-testnet 3 it is compiling but on testnet 2 it is failing with the above error. Why so ?

Ahh yes I believe this feature was implemented after the beta-2 testnet was released.