Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds example for emptycallback closing #651
Has an explicit comment instructing the user in the use of `move` since thats something people struggle with. I could have made the example nicer and more functional. It could be refactored with a function that generates the callback. Then we would have something like: ```rust fn new_playlist_pos_callback() -> impl Fn() + Send { ... } sink.append(song); sink.append(new_playlist_pos_callback()); sink.append(song); sink.append(new_playlist_pos_callback()); sink.append(song); sink.append(new_playlist_pos_callback()); ``` I chose instead to keep it as short and simple as possible, even though the example code on its own is not as usefull now. Functions returning a generic boxed closure are hard to understand and that distracts from what we are trying to show here (how to use the emptycallback source).
- Loading branch information