Skip to content

Commit 71f752b

Browse files
committed
Update signature of try_recv()
1 parent 9a2286d commit 71f752b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/guide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5074,7 +5074,7 @@ The `channel()` function returns two endpoints: a `Receiver<T>` and a
50745074
`Sender<T>`. You can use the `.send()` method on the `Sender<T>` end, and
50755075
receive the message on the `Receiver<T>` side with the `recv()` method. This
50765076
method blocks until it gets a message. There's a similar method, `.try_recv()`,
5077-
which returns an `Option<T>` and does not block.
5077+
which returns an `Result<T, TryRecvError>` and does not block.
50785078

50795079
If you want to send messages to the task as well, create two channels!
50805080

0 commit comments

Comments
 (0)