News for hackers. Stuff that matters.
Re:Rust: The Hard Parts – Part One: References, Borrowing, a... by saghm on Thursday March 21, 2019 @03:37PM (#19456406)
> fn mv_mutable(mut a : MyThing) {}

Compared to simply `a: MyThing`, there are two main reasons when you'd want to do this, namely a) when you want to reassign a different value to `a` or b) when you want to make a mutable reference to `a` (i.e. `&mut a`).

> fn mutable_ref_mutable(mut a : &mut MyThing) {}

Since you already have an `&mut MyThing`, reason "b" from above doesn't apply here, generally the only reason you'd need to do this is if you wanted to reassign a different value to `a`. Technically you would also need it if for some reason you needed an `&mut &mut MyThing`, but that isn't likely to be something you need very often.

Re:Rust: The Hard Parts – Part One: References, Borrowing, a... by naftulikay on Thursday March 21, 2019 @06:03PM (#19457817)
Exactly.