In the example, somebody who is trying to understand this code has to
follow a lot of moving pieces: prefix, name, make_greeter, and then also
learn the new move concept at the same time.
It'd be better if the content were to actually match the name of the
variables. "Hi" is a good prefix, but "there" is not a name, so let's go
with an actual name.
Bumps the patch group in /src/exercises/bare-metal/rtc with 1 update:
[chrono](https://github.com/chronotope/chrono).
Updates `chrono` from 0.4.33 to 0.4.34
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
In the details section, it is suggested to adjust the signature of the
nearest function to "lie" about the lifetimes returned to:
fn nearest<'a, 'q'>(points: &'a [Point], query: &'q Point) -> Option<&'q
Point> {
to demonstrate the compiler checks lifetimes for validity. However, the
syntax for 'q is incorrect and it should instead be
fn nearest<'a, 'q>(points: &'a [Point], query: &'q Point) -> Option<&'q
Point> {
Based on feedback from @marshallpierce that mornings took about 2.5
hours, this adjusts a bunch of the morning times downward to try to
match that. In other words, this is trying to make the times in the
course more accurate, rather than reducing the amount of time available
for these slides.
This also updates the `course-schedule` tool to be able to show
per-segment timings.
Bumps the minor group with 2 updates:
[pulldown-cmark](https://github.com/raphlinus/pulldown-cmark) and
[tokio](https://github.com/tokio-rs/tokio).
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Walbran <qwandor@google.com>
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
```