Skip to content

Commit beb8d24

Browse files
authored
Merge pull request #688 from ninj/patch-1
fix syntax problem for task::sleep
2 parents 1ababac + b258215 commit beb8d24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: docs/src/patterns/accept-loop.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ the connection to the protocol handler, like this:
9090
# let mut incoming = listener.incoming();
9191
while let Some(stream) = incoming.next().await {
9292
task::spawn(async {
93-
task:sleep(Duration::from_secs(10)).await; // 1
93+
task::sleep(Duration::from_secs(10)).await; // 1
9494
connection_loop(stream).await;
9595
});
9696
}

0 commit comments

Comments
 (0)