Merge pull request #688 from ninj/patch-1

fix syntax problem for task::sleep
This commit is contained in:
Yoshua Wuyts 2020-01-25 23:40:43 +01:00 committed by GitHub
commit beb8d240c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,7 +90,7 @@ the connection to the protocol handler, like this:
# let mut incoming = listener.incoming(); # let mut incoming = listener.incoming();
while let Some(stream) = incoming.next().await { while let Some(stream) = incoming.next().await {
task::spawn(async { task::spawn(async {
task:sleep(Duration::from_secs(10)).await; // 1 task::sleep(Duration::from_secs(10)).await; // 1
connection_loop(stream).await; connection_loop(stream).await;
}); });
} }