4 ms·
> you accidentally overwrote a function parameter To "accidentally" overwrite it, you have to either: a) explicitly mark the parameter binding as mutable: f
by stouset 4y ago
> you accidentally overwrote a function parameter
To "accidentally" overwrite it, you have to either:
a) explicitly mark the parameter binding as mutable: fn foo(mut bar: T)
b) explicitly re-bind the variable with let (let bar: T = …)