You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-06-15 13:50:27 +02:00
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.
Course Content
The files in this directory make up the content of the course. The files here
can include third-party content from ../third_party/
as well.
When we publish a translation of the course, we git restore
the src/
and
third_party/
directories at the repository root back to the date listed in the
POT-Creation-Date header of the translation. It is crucial, that all
translatable content lives in those two directories. The other files (such as
book.toml
and theme/
) are not restored and we always use the latest version
of them.