Can someone help me with my code?
I'm struggling to understand how you can work with shared mutable data and tokio.
Currently I'm only having this compile time error:
error[E0515]: cannot return value referencing local data `database` --> src/main.rs:42:9 | 41 | database.query(sql, params) | --------^^^^^^^^^^^^^^^^^^^ | | | returns a value referencing data owned by the current function | `database` is borrowed here error: aborting due to previous error For more information about this error, try `rustc --explain E0515`.
I tried to work with lifetimes to tell the compiler that the passed data is valid, but I guess I'm misunderstanding the error message.
I'm happy for any major or minor advice!
Thanks in advance.