Compare commits
No commits in common. "c437f75fcf768c30c1bd450b020eb6707975a0dd" and "af6c605fe6fda9d78f67e8124250c52d3a5fede3" have entirely different histories.
c437f75fcf
...
af6c605fe6
|
@ -31,11 +31,11 @@ jobs:
|
||||||
run: cargo install --path helpers/mdbook-exercise-linker
|
run: cargo install --path helpers/mdbook-exercise-linker
|
||||||
- name: Install link shortener plugin
|
- name: Install link shortener plugin
|
||||||
run: cargo install --path helpers/mdbook-link-shortener
|
run: cargo install --path helpers/mdbook-link-shortener
|
||||||
- name: Install mdbook-pandoc, calibre, pdftk and related dependencies
|
- name: Install mdbook-pandoc, calibre and related dependencies
|
||||||
run: |
|
run: |
|
||||||
cargo install mdbook-pandoc --locked --version 0.7.1
|
cargo install mdbook-pandoc --locked --version 0.7.1
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y fonts-noto calibre pdftk
|
sudo apt-get install -y fonts-noto calibre
|
||||||
|
|
||||||
export PANDOC_VERSION=3.3
|
export PANDOC_VERSION=3.3
|
||||||
curl -LsSf https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz | tar zxf -
|
curl -LsSf https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz | tar zxf -
|
||||||
|
@ -81,10 +81,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cd book
|
cd book
|
||||||
mdbook build
|
mdbook build
|
||||||
- name: Add cover and back to downloadable PDF
|
|
||||||
run: |
|
|
||||||
pdftk book/assets/cover.pdf book/book/pandoc/pdf/100-exercises-to-learn-rust.pdf book/assets/back.pdf cat output book/book/pandoc/pdf/100-exercises-to-learn-rust-with-cover.pdf
|
|
||||||
mv book/book/pandoc/pdf/100-exercises-to-learn-rust-with-cover.pdf book/book/pandoc/pdf/100-exercises-to-learn-rust.pdf
|
|
||||||
- name: Convert HTML to ePUB
|
- name: Convert HTML to ePUB
|
||||||
run: |
|
run: |
|
||||||
cd book/book/pandoc/html
|
cd book/book/pandoc/html
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -119,6 +119,18 @@ standalone = true
|
||||||
metadata-file = "metadata.yml"
|
metadata-file = "metadata.yml"
|
||||||
|
|
||||||
[output.pandoc.profile.html.variables]
|
[output.pandoc.profile.html.variables]
|
||||||
|
mainfont = "CoreSansA45.ttf"
|
||||||
|
mainfontoptions = [
|
||||||
|
"BoldFont=CoreSansA65.ttf",
|
||||||
|
"ItalicFont=CoreSansA45It.ttf",
|
||||||
|
"BoldItalicFont=CoreSansA65It.ttf",
|
||||||
|
]
|
||||||
|
sansfont = "CoreSansA45.ttf"
|
||||||
|
sansfontoptions = [
|
||||||
|
"BoldFont=CoreSansA65.ttf",
|
||||||
|
"ItalicFont=CoreSansA45It.ttf",
|
||||||
|
"BoldItalicFont=CoreSansA65It.ttf",
|
||||||
|
]
|
||||||
# You can get these fonts here: https://fonts.google.com/selection?query=noto+color+
|
# You can get these fonts here: https://fonts.google.com/selection?query=noto+color+
|
||||||
monofont = "Noto Sans Mono"
|
monofont = "Noto Sans Mono"
|
||||||
mainfontfallback = ["Noto Color Emoji:mode=harf"]
|
mainfontfallback = ["Noto Color Emoji:mode=harf"]
|
||||||
|
@ -126,4 +138,6 @@ sansfontfallback = ["Noto Color Emoji:mode=harf"]
|
||||||
monofontfallback = [
|
monofontfallback = [
|
||||||
"Noto Color Emoji:mode=harf",
|
"Noto Color Emoji:mode=harf",
|
||||||
]
|
]
|
||||||
|
linkcolor = "Links"
|
||||||
|
urlcolor = "Links"
|
||||||
urlstyle = "rm"
|
urlstyle = "rm"
|
||||||
|
|
|
@ -181,7 +181,6 @@
|
||||||
"https://valgrind.org/docs/manual/dh-manual.html": "f2t",
|
"https://valgrind.org/docs/manual/dh-manual.html": "f2t",
|
||||||
"https://veykril.github.io/tlborm/": "fz5",
|
"https://veykril.github.io/tlborm/": "fz5",
|
||||||
"https://without.boats/blog/the-scoped-task-trilemma/": "f67",
|
"https://without.boats/blog/the-scoped-task-trilemma/": "f67",
|
||||||
"https://www.amazon.com/dp/B0DJ14KQQG/": "f6g",
|
|
||||||
"https://www.lpalmieri.com/": "ffv",
|
"https://www.lpalmieri.com/": "ffv",
|
||||||
"https://www.lpalmieri.com/posts/2020-12-11-zero-to-production-6-domain-modelling/": "f4t",
|
"https://www.lpalmieri.com/posts/2020-12-11-zero-to-production-6-domain-modelling/": "f4t",
|
||||||
"https://www.oreilly.com/library/view/programming-rust-2nd/9781492052586/": "f6y",
|
"https://www.oreilly.com/library/view/programming-rust-2nd/9781492052586/": "f6y",
|
||||||
|
|
|
@ -34,8 +34,8 @@ also find solutions to all exercises in the
|
||||||
|
|
||||||
## Formats
|
## Formats
|
||||||
|
|
||||||
You can go through the course material [in the browser](https://rust-exercises.com/100-exercises/) or [download it as a PDF file](https://rust-exercises.com/100-exercises-to-learn-rust.pdf), for offline reading.\
|
You can go through the course material [in the browser](https://rust-exercises.com/100-exercises/).\
|
||||||
If you prefer to have the course material printed out, [buy a paperback copy on Amazon](https://www.amazon.com/dp/B0DJ14KQQG/).
|
You can also [download it as a PDF file](https://rust-exercises.com/100-exercises-to-learn-rust.pdf), for offline reading.
|
||||||
|
|
||||||
## Structure
|
## Structure
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Combinators
|
# Combinators
|
||||||
|
|
||||||
Iterators can do so much more than `for` loops!\
|
Iterators can do so much more than `for` loops!\
|
||||||
If you look at the documentation for the `Iterator` trait, you'll find a **vast** collection of
|
If you look at the documentation for the `Iterator` trait, you'll find a **vast** collections of
|
||||||
methods that you can leverage to transform, filter, and combine iterators in various ways.
|
methods that you can leverage to transform, filter, and combine iterators in various ways.
|
||||||
|
|
||||||
Let's mention the most common ones:
|
Let's mention the most common ones:
|
||||||
|
|
|
@ -107,7 +107,7 @@ asynchronous programming in Rust.
|
||||||
The entrypoint of your executable, the `main` function, must be a synchronous function.
|
The entrypoint of your executable, the `main` function, must be a synchronous function.
|
||||||
That's where you're supposed to set up and launch your chosen async runtime.
|
That's where you're supposed to set up and launch your chosen async runtime.
|
||||||
|
|
||||||
Most runtimes provide a macro to make this easier. For `tokio`, it's `tokio::main`:
|
Most runtimes provides a macro to make this easier. For `tokio`, it's `tokio::main`:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
|
|
|
@ -12,7 +12,6 @@ impl Ticket {
|
||||||
// - the `title` should be at most 50 bytes long.
|
// - the `title` should be at most 50 bytes long.
|
||||||
// - the `description` should be at most 500 bytes long.
|
// - the `description` should be at most 500 bytes long.
|
||||||
// The method should panic if any of the requirements are not met.
|
// The method should panic if any of the requirements are not met.
|
||||||
// You can find the needed panic messages in the tests.
|
|
||||||
//
|
//
|
||||||
// You'll have to use what you learned in the previous exercises,
|
// You'll have to use what you learned in the previous exercises,
|
||||||
// as well as some `String` methods. Use the documentation of Rust's standard library
|
// as well as some `String` methods. Use the documentation of Rust's standard library
|
||||||
|
|
|
@ -180,7 +180,6 @@
|
||||||
/f2t https://valgrind.org/docs/manual/dh-manual.html
|
/f2t https://valgrind.org/docs/manual/dh-manual.html
|
||||||
/fz5 https://veykril.github.io/tlborm/
|
/fz5 https://veykril.github.io/tlborm/
|
||||||
/f67 https://without.boats/blog/the-scoped-task-trilemma/
|
/f67 https://without.boats/blog/the-scoped-task-trilemma/
|
||||||
/f6g https://www.amazon.com/dp/B0DJ14KQQG/
|
|
||||||
/ffv https://www.lpalmieri.com/
|
/ffv https://www.lpalmieri.com/
|
||||||
/f4t https://www.lpalmieri.com/posts/2020-12-11-zero-to-production-6-domain-modelling/
|
/f4t https://www.lpalmieri.com/posts/2020-12-11-zero-to-production-6-domain-modelling/
|
||||||
/f6y https://www.oreilly.com/library/view/programming-rust-2nd/9781492052586/
|
/f6y https://www.oreilly.com/library/view/programming-rust-2nd/9781492052586/
|
||||||
|
|
Loading…
Reference in New Issue