I’m having some issues with mutable/non-mutable borrowings. I’ve been developing in Rust for almost a year now and I’ve never encountered such an interesting issue. The thing is, I have a struct where I want to push some string to an owned vector if something happens, depending on some information on that vector. I created the minimum example in Rust Playground:
How can I fix it? It shouldn’t be so difficult, since I only need to push things, I won’t modify what it’s currently in the vector.