Skip to content

Commit

Permalink
Use $ consistently in bash scripts and apply bash syntax highlighting (
Browse files Browse the repository at this point in the history
  • Loading branch information
timKraeuter authored Apr 15, 2024
1 parent b907bdf commit c10b739
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
18 changes: 9 additions & 9 deletions content/tokio/tutorial/channels.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@ Now that we have learned a bit about concurrency with Tokio, let's apply this on
the client side. Put the server code we wrote before into an explicit binary
file:

```text
mkdir src/bin
mv src/main.rs src/bin/server.rs
```bash
$ mkdir src/bin
$ mv src/main.rs src/bin/server.rs
```

and create a new binary file that will contain the client code:

```text
touch src/bin/client.rs
```bash
$ touch src/bin/client.rs
```

In this file you will write this page's code. Whenever you want to run it,
you will have to launch the server first in a separate terminal window:

```text
cargo run --bin server
```bash
$ cargo run --bin server
```

And then the client, __separately__:

```text
cargo run --bin client
```bash
$ cargo run --bin client
```

That being said, let's code!
Expand Down
8 changes: 4 additions & 4 deletions content/tokio/tutorial/io.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,14 @@ To start, we will implement the echo logic using the [`io::copy`][copy] utility.

You can write up this code in a new binary file:

```text
touch src/bin/echo-server-copy.rs
```bash
$ touch src/bin/echo-server-copy.rs
```

That you can launch (or just check the compilation) with:

```text
cargo run --bin echo-server-copy
```bash
$ cargo run --bin echo-server-copy
```

You will be able to try the server using a standard command-line tool such as `telnet`, or by writing
Expand Down
2 changes: 1 addition & 1 deletion content/tokio/tutorial/streams.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ If you hit an error message like this, try pinning the value!

Before trying to run this, start the Mini-Redis server:

```text
```bash
$ mini-redis-server
```

Expand Down

0 comments on commit c10b739

Please sign in to comment.