Skip to content

Commit b258215

Browse files
authored
fix syntax problem for task::sleep
1 parent 1ababac commit b258215

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)