Skip to content

Conversation

@AlfredWilmot
Copy link

I really like the approach of documenting the expected terminal output of code-snippets in the tutorial, as this lets the reader sanity-check their own code, which also helps with engagement by encouraging them to run the tutorial code themselves.

Here's an example of this from the spawning section:

Now, run this accept loop:
```bash
$ cargo run
```
In a separate terminal window, run the `hello-redis` example (the `SET`/`GET`
command from the previous section):
```bash
$ cargo run --example hello-redis
```
The output should be:
```text
Error: "unimplemented"
```
In the server terminal, the output is:
```text
GOT: Array([Bulk(b"set"), Bulk(b"hello"), Bulk(b"world")])
```

This PR follows that same pattern but for the channels section, which at the time of writing does not show the expected client/server terminal outputs at the end of the section.

doc-test is passing following these changes:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant