From b258215952b5819c08b05c838c285395b5f88ebd Mon Sep 17 00:00:00 2001 From: ninj Date: Sat, 25 Jan 2020 22:13:26 +0000 Subject: [PATCH] fix syntax problem for task::sleep --- docs/src/patterns/accept-loop.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/patterns/accept-loop.md b/docs/src/patterns/accept-loop.md index 43c3f41..4508baf 100644 --- a/docs/src/patterns/accept-loop.md +++ b/docs/src/patterns/accept-loop.md @@ -90,7 +90,7 @@ the connection to the protocol handler, like this: # let mut incoming = listener.incoming(); while let Some(stream) = incoming.next().await { task::spawn(async { - task:sleep(Duration::from_secs(10)).await; // 1 + task::sleep(Duration::from_secs(10)).await; // 1 connection_loop(stream).await; }); }