Compare commits
9 Commits
a7865baf3c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8791feb495 | ||
|
|
a2fe212f44 | ||
|
|
20a2b45e49 | ||
|
|
c3cb1b38f6 | ||
|
|
af4fe9cedb | ||
|
|
21f3427c92 | ||
|
|
b839c770b5 | ||
|
|
fd23b201fe | ||
|
|
13850a6b01 |
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -56,7 +56,7 @@ jobs:
|
|||||||
echo "$PWD/pandoc-${PANDOC_VERSION}/bin" >> $GITHUB_PATH
|
echo "$PWD/pandoc-${PANDOC_VERSION}/bin" >> $GITHUB_PATH
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Setup TeX Live
|
- name: Setup TeX Live
|
||||||
uses: teatimeguest/setup-texlive-action@v3
|
uses: TeX-Live/setup-texlive-action@v3
|
||||||
with:
|
with:
|
||||||
packages:
|
packages:
|
||||||
scheme-basic
|
scheme-basic
|
||||||
|
|||||||
1927
Cargo.lock
generated
1927
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -75,14 +75,14 @@ development,
|
|||||||
therefore it sacrifices runtime performance in favor of faster compilation times and a better debugging experience.\
|
therefore it sacrifices runtime performance in favor of faster compilation times and a better debugging experience.\
|
||||||
The `release` profile, instead, is optimized for runtime performance but incurs longer compilation times. You need
|
The `release` profile, instead, is optimized for runtime performance but incurs longer compilation times. You need
|
||||||
to explicitly request via the `--release` flag—e.g. `cargo build --release` or `cargo run --release`.
|
to explicitly request via the `--release` flag—e.g. `cargo build --release` or `cargo run --release`.
|
||||||
The `test` profile is the default profile used by `cargo test`. The `test` profile inherits the settings form the `dev` profile.
|
The `test` profile is the default profile used by `cargo test`. The `test` profile inherits the settings from the `dev` profile.
|
||||||
The `bench` profile is the default profile used by `cargo bench`. The `bench` profile inherits from the `release` profile.
|
The `bench` profile is the default profile used by `cargo bench`. The `bench` profile inherits from the `release` profile.
|
||||||
Use `dev` for iterative development and debugging, `release` for optimized production builds,\
|
Use `dev` for iterative development and debugging, `release` for optimized production builds,\
|
||||||
`test` for correctness testing, and `bench` for performance benchmarking.
|
`test` for correctness testing, and `bench` for performance benchmarking.
|
||||||
|
|
||||||
> "Have you built your project in release mode?" is almost a meme in the Rust community.\
|
> "Have you built your project in release mode?" is almost a meme in the Rust community.\
|
||||||
> It refers to developers who are not familiar with Rust and complain about its performance on
|
> It refers to developers who are not familiar with Rust and complain about its performance on
|
||||||
> social media (e.g. Reddit, Twitter, etc.) before realizing they haven't built their project in
|
> social media (e.g. Reddit, Twitter) before realizing they haven't built their project in
|
||||||
> release mode.
|
> release mode.
|
||||||
|
|
||||||
You can also define custom profiles or customize the built-in ones.
|
You can also define custom profiles or customize the built-in ones.
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ match status {
|
|||||||
The `_` pattern matches anything that wasn't matched by the previous patterns.
|
The `_` pattern matches anything that wasn't matched by the previous patterns.
|
||||||
|
|
||||||
<div class="warning">
|
<div class="warning">
|
||||||
By using this catch-all pattern, you _won't_ get the benefits of compiler-driven refactoring.\
|
By using this catch-all pattern, you _won't_ get the benefits of compiler-driven refactoring.
|
||||||
If you add a new enum variant, the compiler _won't_ tell you that you're not handling it.
|
If you add a new enum variant, the compiler _won't_ tell you that you're not handling it.
|
||||||
|
|
||||||
If you're keen on correctness, avoid using catch-alls. Leverage the compiler to re-examine all matching sites and determine how new enum variants should be handled.
|
If you're keen on correctness, avoid using catch-alls. Leverage the compiler to re-examine all matching sites and determine how new enum variants should be handled.
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ match status {
|
|||||||
println!("Assigned to: {}", assigned_to);
|
println!("Assigned to: {}", assigned_to);
|
||||||
},
|
},
|
||||||
Status::ToDo | Status::Done => {
|
Status::ToDo | Status::Done => {
|
||||||
println!("Done");
|
println!("ToDo or Done");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -82,7 +82,7 @@ match status {
|
|||||||
println!("Assigned to: {}", person);
|
println!("Assigned to: {}", person);
|
||||||
},
|
},
|
||||||
Status::ToDo | Status::Done => {
|
Status::ToDo | Status::Done => {
|
||||||
println!("Done");
|
println!("ToDo or Done");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ Let's unpack what's happening.
|
|||||||
## `scope`
|
## `scope`
|
||||||
|
|
||||||
The `std::thread::scope` function creates a new **scope**.\
|
The `std::thread::scope` function creates a new **scope**.\
|
||||||
`std::thread::scope` takes as input a closure, with a single argument: a `Scope` instance.
|
`std::thread::scope` takes a closure as input, with a single argument: a `Scope` instance.
|
||||||
|
|
||||||
## Scoped spawns
|
## Scoped spawns
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Before we wrap up this chapter, let's talk about another key trait in Rust's sta
|
|||||||
`Sync` is an auto trait, just like `Send`.\
|
`Sync` is an auto trait, just like `Send`.\
|
||||||
It is automatically implemented by all types that can be safely **shared** between threads.
|
It is automatically implemented by all types that can be safely **shared** between threads.
|
||||||
|
|
||||||
In order words: `T` is Sync if `&T` is `Send`.
|
In other words: `T` is Sync if `&T` is `Send`.
|
||||||
|
|
||||||
## `T: Sync` doesn't imply `T: Send`
|
## `T: Sync` doesn't imply `T: Send`
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ at any given time.
|
|||||||
|
|
||||||
### Multithreaded runtime
|
### Multithreaded runtime
|
||||||
|
|
||||||
When using the multithreaded runtime, instead, there can up to `N` tasks running
|
When using the multithreaded runtime, instead, there can be up to `N` tasks running
|
||||||
_in parallel_ at any given time, where `N` is the number of threads used by the
|
_in parallel_ at any given time, where `N` is the number of threads used by the
|
||||||
runtime. By default, `N` matches the number of available CPU cores.
|
runtime. By default, `N` matches the number of available CPU cores.
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
thiserror = "1.0.59"
|
thiserror = "1.0.69"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
common = { path = "../../../helpers/common" }
|
common = { path = "../../../helpers/common" }
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
thiserror = "1.0.59"
|
thiserror = "1.0.69"
|
||||||
ticket_fields = { path = "../../../helpers/ticket_fields" }
|
ticket_fields = { path = "../../../helpers/ticket_fields" }
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
thiserror = "1.0.60"
|
thiserror = "1.0.69"
|
||||||
ticket_fields = { path = "../../../helpers/ticket_fields" }
|
ticket_fields = { path = "../../../helpers/ticket_fields" }
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
thiserror = "1.0.60"
|
thiserror = "1.0.69"
|
||||||
ticket_fields = { path = "../../../helpers/ticket_fields" }
|
ticket_fields = { path = "../../../helpers/ticket_fields" }
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.83"
|
anyhow = "1.0.100"
|
||||||
tokio = { version = "1", features = ["full"] }
|
tokio = { version = "1", features = ["full"] }
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.83"
|
anyhow = "1.0.100"
|
||||||
tokio = { version = "1", features = ["full"] }
|
tokio = { version = "1", features = ["full"] }
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.83"
|
anyhow = "1.0.100"
|
||||||
tokio = { version = "1", features = ["full"] }
|
tokio = { version = "1", features = ["full"] }
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.83"
|
anyhow = "1.0.100"
|
||||||
tokio = { version = "1", features = ["full"] }
|
tokio = { version = "1", features = ["full"] }
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.86"
|
anyhow = "1.0.100"
|
||||||
clap = "4.5.4"
|
clap = "4.5.50"
|
||||||
mdbook = "0.4.40"
|
mdbook = "0.4.52"
|
||||||
semver = "1.0.23"
|
semver = "1.0.27"
|
||||||
serde_json = "1.0.117"
|
serde_json = "1.0.145"
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.86"
|
anyhow = "1.0.100"
|
||||||
bimap = { version = "0.6.3", features = ["serde"] }
|
bimap = { version = "0.6.3", features = ["serde"] }
|
||||||
clap = { version = "4.5.4", features = ["derive"] }
|
clap = { version = "4.5.50", features = ["derive"] }
|
||||||
itertools = "0.13.0"
|
itertools = "0.13.0"
|
||||||
mdbook = "0.4.40"
|
mdbook = "0.4.52"
|
||||||
pulldown-cmark = "0.11.0"
|
pulldown-cmark = "0.11.3"
|
||||||
pulldown-cmark-to-cmark = "15"
|
pulldown-cmark-to-cmark = "15"
|
||||||
semver = "1.0.23"
|
semver = "1.0.27"
|
||||||
serde_json = "1.0.117"
|
serde_json = "1.0.145"
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ edition = "2021"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
common = { path = "../common" }
|
common = { path = "../common" }
|
||||||
thiserror = "1.0.59"
|
thiserror = "1.0.69"
|
||||||
|
|||||||
Reference in New Issue
Block a user