😭 The borrow checker is no pushover. Brain turning to goo trying to figure out how to tie the lifetime of this channel sender to an Arc of a callback closure.

@mauve it's possible the `move` keyword could help, and it's not always obvious when you need to use it.

Often when I make a closure that needs to send something I will move the sender into the closure using this keyword. Some examples in the doc page:

doc.rust-lang.org/std/keyword.

Follow

@coy I haven't come across this before, ty. I'll try it out in the morning. 🙇

Sign in to participate in the conversation
Mauvestodon

Escape ship from centralized social media run by Mauve.