Knowing to_string method is good for learner to use at some situation.
Knowing print complete struct object can be useful while debug.
---------
Co-authored-by: Dustin J. Mitchell <djmitche@google.com>
Swapping forks for one philosopher feels like cheating. It's like one of
the philosophers is facing away from the table. Or perhaps it's the only
right-handed philosopher at the table.
More importantly, there is no effective mechanism to prevent deadlocks.
Add that mechanism, it's useful for learning Rust.
The new code demonstrates let-else, drop and returning values from a
loop. `std::mem::swap` remains in the thread version of the Dining
Philosophers exercise for now.
This also fixes compilation. `left_fork` and `right_fork` had to be
`mut` in `main()` for the workaround to compile.
Bumps the patch group in /src/exercises/bare-metal/rtc with 1 update:
[chrono](https://github.com/chronotope/chrono).
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the patch group in /src/bare-metal/alloc-example with 1 update:
[buddy_system_allocator](https://github.com/rcore-os/buddy_system_allocator).
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Publishes the new translations for CR2 (originally from zh-CN-cr2) #1463
which were previously reviewed.
It also removes line numbers (#1753)
#324
You can skim this PR with the [GitHub CLI](https://cli.github.com/):
```
gh pr diff 1764 | bat -l patch
```
From @mgeisler PRs (e.g. #1752, #1753)
This is a clean refresh, requires only a syntactic review.
You can skim this PR with the [GitHub CLI](https://cli.github.com/):
```
gh pr diff 1759 | bat -l patch
```
This allows dumping the course content in order, which I've needed
several times to verify whether a concept is used before it is covered
-- for example in #1516 I want to make sure we don't use trait objects
before the Smart Pointers section.
This is a clean refresh, requires only a syntactical review.
You can skim this PR with the [GitHub CLI](https://cli.github.com/):
```
gh pr diff 1745 | bat -l patch
```
This is a clean refresh, requires only a syntactical review.
You can skim this PR with the [GitHub CLI](https://cli.github.com/):
```
gh pr diff 1737 | bat -l patch
```
This is a clean refresh, requires only a syntactical review.
You can skim this PR with the [GitHub CLI](https://cli.github.com/):
```
gh pr diff 1741 | bat -l patch
```
This is a clean refresh, requires only a syntaxtical review.
You can skim this PR with the [GitHub CLI](https://cli.github.com/):
```
gh pr diff 1750 | bat -l patch
```
This is a clean refresh, requires only a syntactical review.
You can skim this PR with the [GitHub CLI](https://cli.github.com/):
```
gh pr diff 1752 | bat -l patch
```
This is a clean refresh, requires only a syntactical review.
You can skim this PR with the [GitHub CLI](https://cli.github.com/):
```
gh pr diff 1740 | bat -l patch
```
Long overdue.
It felt a bit "odd" self-assigning merit, especially because I think I
haven't nearly contributed enough translations. So I looked at the
[history of `it.po` file](https://github.com/google/comprehensive-rust/commits/main/po/it.po)
and identified also @henrythebuilder as the other "owner" of the Italian
translation (definitely, based on number of lines contributed).
@henrythebuilder please confirm you are comfortable with this.
This is a clean refresh, requires only a syntactical review.
You can skim this PR with the [GitHub CLI](https://cli.github.com/):
```
gh pr diff 1739 | bat -l patch
```
This is a clean refresh, requires only a syntaxtical review.
You can skim this PR with the [GitHub CLI](https://cli.github.com/):
```
gh pr diff 1748 | bat -l patch
```
This is a clean refresh, requires only a syntaxtical review.
You can skim this PR with the [GitHub CLI](https://cli.github.com/):
```
gh pr diff 1749 | bat -l patch
```
IMO it is better to explain to users the common usage / applicability
domain for anyhow and thiserror crates
---------
Co-authored-by: Dustin J. Mitchell <djmitche@google.com>
This should be a bit simpler, and notably
* does not require trait objects, which per #1516 should be moved later
in the course
* does not require a lot of futzing with string formatting
But all that hard work developing the GUI exercise is not for naught: it
remains in the "Modules" segment, where students will get a chance to
read some Rust code and reorganize it a little bit.
Fixes#1617.
R=mgeisler as the original author of the GUI exercise.
Bumps the minor group in /src/exercises/bare-metal/compass with 1
update: [lsm303agr](https://github.com/eldruin/lsm303agr-rs).
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Hi, ja translation team (#652 ). Here's an MR for the chapter "Shared
States." Could you review the translations? any feedback would be
appreciated. Thank you 😄
cc: @keiichiw , @chikoski , @HidenoriKobayashi , @ternbusty
(Retrieved translaftion draft #1636 Chapter 60 draft, after recent
`ja.po` file refresh #1676 )
Bumps the patch group with 1 update:
[clap](https://github.com/clap-rs/clap).
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the patch group in /src/exercises/bare-metal/rtc with 1 update:
[bitflags](https://github.com/bitflags/bitflags).
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the patch group in /src/bare-metal/aps/examples with 1 update:
[bitflags](https://github.com/bitflags/bitflags).
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the minor group in /src/bare-metal/microcontrollers/examples with
2 updates: [nrf52833-hal](https://github.com/nrf-rs/nrf-hal) and
[nrf52833-pac](https://github.com/nrf-rs/nrf-pacs).
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>