dioxus/packages/core/tests/channels.rs

20 lines
339 B
Rust
Raw Normal View History

2021-08-06 02:23:41 +00:00
use futures_channel::mpsc::unbounded;
#[async_std::test]
async fn channels() {
let (sender, mut receiver) = unbounded::<u32>();
// drop(sender);
match receiver.try_next() {
Ok(a) => {
dbg!(a);
}
Err(no) => {
dbg!(no);
}
}
sender.unbounded_send(1).unwrap();
}