python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Mutable reference to Vec<_> does not live long enough in while loop
Here's the code so far, the relevant lines are 27 and 28: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=37bba701ad2e9d47741da1149881ddd1
Error message:
error[E059...
leila-m
Votes: 0
Answers: 1
How does destructuring of borrowed data work at compile time?
I've been using destructuring to create references into nested data, just for practice. I created a method that uses destructuring to break apart a borrowed tuple:
fn print_strings((x, y): &(Strin...
C-RAD
Votes: 0
Answers: 1
Mutate an object which was taken from a vector
I have trouble solving an obvious simple problem.
Basically I want to push an instance of a structure to a vector to get it out later and to modify the object by calling a function implemented for the...
Horowitzathome
Votes: 0
Answers: 1
Rust lifetime syntax when borrowing variables
New to Rust and trying to teach myself, etc. I'm stuck on a lifetime issue. The closest question I could find that was already posted was:
Argument requires that _ is borrowed for 'static - how do...
growling_egg
Votes: 0
Answers: 1