79510776

Date: 2025-03-15 07:55:09
Score: 1.5
Natty:
Report link

the problems seems to be a mutability issue; as your example code seems incomplete. you don't share the part of the code where the actual error happens:

 src/diesel.rs:512:18 | 512 | ...        .execute(&mut conn)

.execute(&mut conn) requires a mutable reference to conn. And POOL.get() returns a non-mutable reference. You need a mutable reference to conn.

here how to get mutable-reference to underlying data in a OnceLock https://stackoverflow.com/a/76695396/29977423

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: pirate