Fix ownership of async tasks
This commit is contained in:
parent
82780c0009
commit
510ecfec6d
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@ fn main() {
|
|||
trpl::run(async {
|
||||
let (tx, mut rx) = trpl::channel();
|
||||
|
||||
let tx_fut = async {
|
||||
let tx_fut = async move {
|
||||
let vals = vec![
|
||||
String::from("hi"),
|
||||
String::from("from"),
|
||||
|
@ -20,7 +20,7 @@ fn main() {
|
|||
|
||||
let rx_fut = async {
|
||||
while let Some(value) = rx.recv().await {
|
||||
println!("received '{value}'");
|
||||
eprintln!("received '{value}'");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue