😭 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 This was exactly what I needed! thank you so much 

· · Web · 0 · 0 · 1
Sign in to participate in the conversation
Mauvestodon

Escape ship from centralized social media run by Mauve.