1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-16 22:27:34 +02:00

remove $ from code blocks in the other markdown files as well

This commit is contained in:
Sharun
2023-07-10 20:45:44 -04:00
parent ef6da1a68d
commit eda922dab9
6 changed files with 20 additions and 14 deletions

View File

@ -16,7 +16,10 @@ Service birthdayservice: found
You can also call the service with `service call`: You can also call the service with `service call`:
```shell ```shell
$ {{#include ../build_all.sh:service_call_birthday_server}} {{#include ../build_all.sh:service_call_birthday_server}}
```
```
Result: Parcel( Result: Parcel(
0x00000000: 00000000 00000036 00610048 00700070 '....6...H.a.p.p.' 0x00000000: 00000000 00000036 00610048 00700070 '....6...H.a.p.p.'
0x00000010: 00200079 00690042 00740072 00640068 'y. .B.i.r.t.h.d.' 0x00000010: 00200079 00690042 00740072 00640068 'y. .B.i.r.t.h.d.'

View File

@ -24,7 +24,10 @@ Build, push, and run the binary on your device:
The logs show up in `adb logcat`: The logs show up in `adb logcat`:
```shell ```shell
$ adb logcat -s rust adb logcat -s rust
```
```
09-08 08:38:32.454 2420 2420 D rust: hello_rust_logs: Starting program. 09-08 08:38:32.454 2420 2420 D rust: hello_rust_logs: Starting program.
09-08 08:38:32.454 2420 2420 I rust: hello_rust_logs: Things are going fine. 09-08 08:38:32.454 2420 2420 I rust: hello_rust_logs: Things are going fine.
09-08 08:38:32.454 2420 2420 E rust: hello_rust_logs: Something went wrong! 09-08 08:38:32.454 2420 2420 E rust: hello_rust_logs: Something went wrong!

View File

@ -4,9 +4,9 @@ We will be using an Android Virtual Device to test our code. Make sure you have
access to one or create a new one with: access to one or create a new one with:
```shell ```shell
$ source build/envsetup.sh source build/envsetup.sh
$ lunch aosp_cf_x86_64_phone-userdebug lunch aosp_cf_x86_64_phone-userdebug
$ acloud create acloud create
``` ```
Please see the [Android Developer Please see the [Android Developer

View File

@ -20,7 +20,7 @@ Along with cargo and rustc, Rustup will install itself as a command line utility
On Debian/Ubuntu, you can install Cargo, the Rust source and the [Rust formatter][6] with On Debian/Ubuntu, you can install Cargo, the Rust source and the [Rust formatter][6] with
```shell ```shell
$ sudo apt install cargo rust-src rustfmt sudo apt install cargo rust-src rustfmt
``` ```
This will allow [rust-analyzer][1] to jump to the definitions. We suggest using This will allow [rust-analyzer][1] to jump to the definitions. We suggest using

View File

@ -77,13 +77,13 @@ described below.
Run the server with: Run the server with:
```shell ```shell
$ cargo run --bin server cargo run --bin server
``` ```
and the client with: and the client with:
```shell ```shell
$ cargo run --bin client cargo run --bin client
``` ```
## Tasks ## Tasks

View File

@ -9,9 +9,9 @@ For this, you will need an HTTP client such as [`reqwest`][1]. Create a new
Cargo project and `reqwest` it as a dependency with: Cargo project and `reqwest` it as a dependency with:
```shell ```shell
$ cargo new link-checker cargo new link-checker
$ cd link-checker cd link-checker
$ cargo add --features blocking,rustls-tls reqwest cargo add --features blocking,rustls-tls reqwest
``` ```
> If `cargo add` fails with `error: no such subcommand`, then please edit the > If `cargo add` fails with `error: no such subcommand`, then please edit the
@ -20,14 +20,14 @@ $ cargo add --features blocking,rustls-tls reqwest
You will also need a way to find links. We can use [`scraper`][2] for that: You will also need a way to find links. We can use [`scraper`][2] for that:
```shell ```shell
$ cargo add scraper cargo add scraper
``` ```
Finally, we'll need some way of handling errors. We use [`thiserror`][3] for Finally, we'll need some way of handling errors. We use [`thiserror`][3] for
that: that:
```shell ```shell
$ cargo add thiserror cargo add thiserror
``` ```
The `cargo add` calls will update the `Cargo.toml` file to look like this: The `cargo add` calls will update the `Cargo.toml` file to look like this:
@ -72,7 +72,7 @@ fn main() {
Run the code in `src/main.rs` with Run the code in `src/main.rs` with
```shell ```shell
$ cargo run cargo run
``` ```
## Tasks ## Tasks