Skip to content

Commit 3c4873b

Browse files
committed
Integrate and update 'veera-sivarajan:add-letElse'
- Merge in changes from `main`, including moving the chapter. - Merge in newly-written introduction of `let-else` in the same section as the `if let` discussion. - Rewrap lines.
3 parents e4e9ba7 + e78a93c + d8792a4 commit 3c4873b

File tree

1,221 files changed

+96732
-12629
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,221 files changed

+96732
-12629
lines changed
File renamed without changes.

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Ran dprint fmt on the repo
2+
3a30e4c1fbe641afc066b3af9eb01dcdf5ed8b24

.github/workflows/main.yml

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,50 @@ jobs:
1212
- name: Install Rust
1313
run: |
1414
rustup set profile minimal
15-
rustup toolchain install 1.67 -c rust-docs
16-
rustup default 1.67
15+
rustup toolchain install 1.82 -c rust-docs
16+
rustup default 1.82
1717
- name: Install mdbook
1818
run: |
1919
mkdir bin
2020
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.21/mdbook-v0.4.21-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
21-
echo "$(pwd)/bin" >> ${GITHUB_PATH}
21+
echo "$(pwd)/bin" >> "${GITHUB_PATH}"
2222
- name: Report versions
2323
run: |
2424
rustup --version
2525
rustc -Vv
2626
mdbook --version
27+
28+
# mdBook does not currently have particularly good support for “external”
29+
# crates. To make the test suite work correctly with `trpl`, we must first
30+
# build `trpl` itself (`mdbook` will not do it), and then explicitly pass
31+
# its `deps` path as a library search path for `mdbook test`. That will make
32+
# sure all the crates can be resolved when running the tests.
33+
- name: Build `trpl` crate
34+
run: |
35+
cd packages/trpl
36+
cargo build
2737
- name: Run tests
28-
run: mdbook test
38+
run:
39+
mdbook test --library-path packages/trpl/target/debug/deps
40+
package_tests:
41+
name: Run package tests
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@master
45+
- name: Update rustup
46+
run: rustup self update
47+
- name: Install Rust
48+
run: |
49+
rustup set profile minimal
50+
rustup toolchain install 1.82 -c rust-docs
51+
rustup default 1.82
52+
- name: Run `tools` package tests
53+
run: |
54+
cargo test
55+
- name: Run `mdbook-trpl` package tests
56+
working-directory: packages/mdbook-trpl
57+
run: |
58+
cargo test
2959
lint:
3060
name: Run lints
3161
runs-on: ubuntu-latest
@@ -42,7 +72,9 @@ jobs:
4272
run: |
4373
mkdir bin
4474
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.21/mdbook-v0.4.21-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
45-
echo "$(pwd)/bin" >> ${GITHUB_PATH}
75+
echo "$(pwd)/bin" >> "${GITHUB_PATH}"
76+
- name: Install mdbook-trpl binaries
77+
run: cargo install --path packages/mdbook-trpl
4678
- name: Install aspell
4779
run: sudo apt-get install aspell
4880
- name: Install shellcheck
@@ -55,7 +87,7 @@ jobs:
5587
aspell --version
5688
shellcheck --version
5789
- name: Shellcheck
58-
run: find . -name '*.sh' | xargs shellcheck
90+
run: find . -name '*.sh' -print0 | xargs -0 shellcheck
5991
- name: Spellcheck
6092
run: bash ci/spellcheck.sh list
6193
- name: Lint for local file paths

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ book/
55
target
66
tmp
77

8+
.nova
9+
.vscode
10+
.zed

2018-edition/src/ch17-00-oop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
The 2018 edition of the book is no longer distributed with Rust's documentation.
44

55
If you came here via a link or web search, you may want to check out [the current
6-
version of the book](../ch17-00-oop.html) instead.
6+
version of the book](../ch18-00-oop.html) instead.
77

88
If you have an internet connection, you can [find a copy distributed with
99
Rust
10-
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-00-oop.html).
10+
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-00-oop.html).

2018-edition/src/ch17-01-what-is-oo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
The 2018 edition of the book is no longer distributed with Rust's documentation.
44

55
If you came here via a link or web search, you may want to check out [the current
6-
version of the book](../ch17-01-what-is-oo.html) instead.
6+
version of the book](../ch18-01-what-is-oo.html) instead.
77

88
If you have an internet connection, you can [find a copy distributed with
99
Rust
10-
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-01-what-is-oo.html).
10+
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-01-what-is-oo.html).

2018-edition/src/ch17-02-trait-objects.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
The 2018 edition of the book is no longer distributed with Rust's documentation.
44

55
If you came here via a link or web search, you may want to check out [the current
6-
version of the book](../ch17-02-trait-objects.html) instead.
6+
version of the book](../ch18-02-trait-objects.html) instead.
77

88
If you have an internet connection, you can [find a copy distributed with
99
Rust
10-
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-02-trait-objects.html).
10+
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-02-trait-objects.html).

2018-edition/src/ch17-03-oo-design-patterns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
The 2018 edition of the book is no longer distributed with Rust's documentation.
44

55
If you came here via a link or web search, you may want to check out [the current
6-
version of the book](../ch17-03-oo-design-patterns.html) instead.
6+
version of the book](../ch18-03-oo-design-patterns.html) instead.
77

88
If you have an internet connection, you can [find a copy distributed with
99
Rust
10-
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-03-oo-design-patterns.html).
10+
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-03-oo-design-patterns.html).

2018-edition/src/ch18-00-patterns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
The 2018 edition of the book is no longer distributed with Rust's documentation.
44

55
If you came here via a link or web search, you may want to check out [the current
6-
version of the book](../ch18-00-patterns.html) instead.
6+
version of the book](../ch19-00-patterns.html) instead.
77

88
If you have an internet connection, you can [find a copy distributed with
99
Rust
10-
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-00-patterns.html).
10+
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-00-patterns.html).

2018-edition/src/ch18-01-all-the-places-for-patterns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
The 2018 edition of the book is no longer distributed with Rust's documentation.
44

55
If you came here via a link or web search, you may want to check out [the current
6-
version of the book](../ch18-01-all-the-places-for-patterns.html) instead.
6+
version of the book](../ch19-01-all-the-places-for-patterns.html) instead.
77

88
If you have an internet connection, you can [find a copy distributed with
99
Rust
10-
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-01-all-the-places-for-patterns.html).
10+
1.30](https://doc.rust-lang.org/1.30.0/book/2018-edition/ch18-01-all-the-places-for-patterns.html).

0 commit comments

Comments
 (0)