How to avoid second borrow in rust when iterating over mutable member of a struct and changing other members
I’m trying to write a code which borrow a mutable copy of the last member of a vector and then change another member of the vector. There is a check that the vector has more than 2 elements so there is no changes to the same element.