1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-16 22:27:34 +02:00
Commit Graph

840 Commits

Author SHA1 Message Date
4b7b5d83ea Make chat-client reads cancellation safe (#713)
* Make chat-client reads cancellation safe

* Update chat-app references
2023-06-09 16:35:52 +02:00
6bf60dadc8 Add information about async cancellation (#716)
* Mention cancellation via select!

* Add a section on async cancellation

* Update cancellation slide, rework example

* Rework select! note about cancellation

* Collapse cancellation comparision to panic and ?

* Don't keep null bytes from incomplete reads
2023-06-09 11:59:12 +02:00
305bdbb29a Fix slices immutable example (#686) 2023-06-06 09:17:55 +00:00
7257052f0c Minor fixes in async (#771) 2023-06-05 17:12:00 +01:00
a7bef92b36 Mentioned the XKCD source of the joke in enums.md (#748)
XKCD is under CC BY-NC 2.5 licence, so it is fair to at least link to the source when reusing a joke.
2023-06-01 18:54:41 +00:00
ff3fa50597 Update lifetimes.md (#739)
* Update lifetimes.md

Don't think elidied is a word, nothing comes up if I google it. I think omitted works here.

* Update lifetimes.md
2023-05-31 12:55:54 +00:00
5de9cdafea Link to incomplete French, German, and Japanese translations (#730)
These translations all have more than 200 translated messages and
they’ve been updated in the last month.

I suggest we update the list here every few weeks based on input from
the translators: we don’t need a super strict rule here, we just need
interested translators who would like to see their work celebrated.

I suggest we only link completed translations in the language picker
since we have limited space there to differentiate the different
levels of completeness.
2023-05-31 11:55:39 +02:00
cee01c4f6a Delete double words (#718) 2023-05-29 16:12:44 +00:00
7ce92303e9 Clarify Default trait and operators (#717)
* Reword description of Default trait

* Clarify comparision to function type parameters

* Mention heterogenous types for operators
2023-05-29 16:09:09 +00:00
0ca16b6fea Fix typo in compile-time.md (#700)
From #675 via @cydave.
2023-05-26 11:59:12 -04:00
364bb107c0 Missing word in welcome day speaker notes (#699) 2023-05-26 14:51:05 +00:00
2482fa3c56 Update build_all.sh (#678)
* Update build_all.sh

The path, $ANDROID_BUILD_TOP and/or $ANDROID_PRODUCT_OUT, can contain spaces, which results in error. As long as shell var is not number, it is safe to enclose it with ""

* Enclose full shell word in quotes

This is just a stylistic choice: I find it easier to parse a command line if the full shell word is in quotes.

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-05-25 08:51:12 +00:00
176d9361d6 Fix a couple typos on the welcome page (#668)
fix a couple typos 

- welcome page typos corrected
2023-05-24 14:15:46 +00:00
dabf31d0ce Fixing some typos (#667)
fix some typos
2023-05-24 08:15:08 +00:00
1c1c367940 Add a sentence about lifetime elision (#663)
add a sentence about lifetime elision
2023-05-23 11:31:35 -04:00
cc813973b1 Update receiver.md (#661)
* Update receiver.md

Moving the sentence to the third point and requesting an example of `self` vs `mut self`.

* Update src/methods/receiver.md

Improved the tone of the sentence.

Co-authored-by: Martin Geisler <martin@geisler.net>

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-05-23 12:57:38 +00:00
47f6a5dacf Update lifetimes.md (#660)
Normally developers are aware of the simpler language of implicit vs explicit. By replacing elided with implicit readability of the application might be improved.
2023-05-23 11:54:01 +00:00
33f81d0610 Update rustc and cargo version information in running-locally.md (#658)
Also improves verbiage of a sentence, from "With this is in place, then follow..." to "With this in place, follow..."
2023-05-23 09:43:57 +00:00
584e3ecd7d Fix inconsistent code in unbounded.md (#656)
Update unbounded.md to address inconsistent code

Fix inconsistency between concurrency `unbounded.md` and `bounded.md` by using implicitly named arguments for both.
2023-05-23 11:36:58 +02:00
032c7e3b6b Fix typo in basic/syntax-static-and-const.md (#650)
Fix typo in basic/syntax-static-and-const.md.
2023-05-22 09:36:52 +01:00
f02facd56d Add missing newlines around <details> (#647)
The newlines makes the text more uniform when extracted into the POT
file (spotted while doing #646).
2023-05-19 09:43:44 -04:00
83663daaa2 Add the description of the chat-app exercise (#641)
* Adds a description of the async chat exercise
* Simplifies the use of Error in chat-async
* Links the solution to the async chat exercise
* Removes the elevator exercise
2023-05-17 18:22:11 +01:00
8406697449 Add code for speaker notes in trait inheritance (#643)
Give code samples of trait inheritance and a blanket implementation.

Signed-off-by: Edward Liaw <edliaw@google.com>
2023-05-17 09:02:02 +00:00
caeabdae3e Beginnings of an async chat exercise (#627)
* beginnings of an async chat exercise

* really basic solution

* format
2023-05-16 15:51:01 +00:00
a788680d5e Fixing a typo in a "details" close tag (#638) 2023-05-15 22:20:54 +00:00
490b20e245 Link badges to the main branch (#636)
This is the only branch for which there is any expectation of
stability, so it makes sense to send people here.
2023-05-15 18:12:10 -04:00
0036843f0c Fix typo in dining-philosophers-async.md (#631) 2023-05-12 14:34:11 +02:00
9c6bb081d4 Update "Running the course" based on latest experience (#628) 2023-05-11 17:23:01 +00:00
11571d0d1a Add dining philosophers as an async exercise (#624)
* Adds dining philosophers as an async exercise
* Adds a solution for async dining philosophers
* Adds a solution page for the afternoon session on concurrency
2023-05-09 17:34:47 +01:00
ce7c5fdf22 Fix mistakes in book-library.rs (#619)
---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-05-08 08:20:42 +00:00
5bbb68be2c Add a file which references some useful crates to use for writing tests (#617)
* Add a slide referencing recommended testing crates

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-05-05 14:59:25 +00:00
5a495a508e Update Cargo.lock. (#614)
This was missed in #583.
2023-05-05 11:25:45 +01:00
d83d1f1c48 Fix pluralisation inconsistency (#612) 2023-05-05 09:57:44 +02:00
d0bf0d7a44 Order Send/Sync before Arc/Mutex (#605)
The Arc/Mutex chapters mention Send/Sync in the speaker notes, and in
fact serve as good illustrations of the traits, so let's define the
traits before referencing them.
2023-05-05 09:50:17 +02:00
9cff14ca31 Link arm-gic to main documentation page rather than crate page (#610) 2023-05-04 14:42:08 +00:00
226aa21f3c Use hyphen rather than underscore for gic-version (#611)
Older versions of QEMU seem to only accept a hyphen, while new versions accept either.
2023-05-04 15:41:15 +01:00
93c1c814c3 Improve phrasing of comment (#609)
Some people interpreted the previous comment as meaning the RTC itself needed to be initialised or started somehow, but this is not the case.
2023-05-04 15:08:44 +01:00
cce3fff0d0 Minor fixes to async notes (#607)
* `join!( .., time::sleep(..))` isn't really a "timeout"

* Remove suggestion to make `sleep` take `&mut self`

I'm not sure what doing so demonstrates.

* Update src/async/control-flow/join.md

Co-authored-by: rbehjati <razieh@google.com>

---------

Co-authored-by: rbehjati <razieh@google.com>
2023-05-04 11:59:19 +00:00
1288d11adb Fix title of 'Runtimes' (#606) 2023-05-04 07:56:43 -04:00
3b07b4768a Add unit tests to Safe FFI exercise (#588) 2023-05-04 12:20:47 +02:00
09c996ad96 Move closures to the top level (#604)
move closures to the top level
2023-05-03 09:30:13 -04:00
841359f5df Simplify methods slide (#594)
This tightens the language slightly. I also added a speaker note with
suggestions for more methods to add (if there is time).
2023-05-03 12:01:21 +02:00
789abc1028 Wrap comments at 80 columns (#592)
When teaching the class, I notice that these comments (which are
wrapped at 100 columns) cause a horizontal scrollbar which makes them
hard to read at a glance.

Here I wrapped them at 80 columns, which fits on the screen and which
avoids overly long lines.
2023-05-03 12:00:58 +02:00
4a09d053ac Simplify fizz buzz slide (#595)
There is no need to introduce `match` here where we don’t have time to
talk about it in detail.
2023-05-03 09:56:58 +02:00
3b21053ff2 Cleanup references to "Day 4" (#603)
* Align outline with new spin-off course structure

With the new structure, the section on Android is a spin-off course
from the main 3-day course on Rust Fundamentals. The Bare-metal and
Concurrency days are spin-off courses in the same way.

* Explain new course structure

* Align Bare-Metal welcome page with other deep dives

* Merge Day 4 page into Course Structure page

* Remove Day 4 Welcome page

This aligns the Concurrency in Rust section with the Bare-Metal Rust
deep dive.

* Show subsections for Android deep dive

This aligns the Rust in Android section with the other deep dives.

* Clean up welcome page and README

We now cover async Rust and the course is no longer a four day course.

* Remove reference to the old Day 4

* Remove Day 4 references from exercises
2023-05-02 08:02:28 +02:00
c67922ce8c Cleanup control flow slides (#587)
* Cleanup control flow slides

This avoids calling all the looping constructs “expressions” since
they all (except for `loop`) return trivial values.

---------

Co-authored-by: Dustin J. Mitchell <djmitche@google.com>
2023-04-29 03:12:24 +00:00
244e5b99c6 Provide more instructions in the library exercise (#589) 2023-04-29 05:11:12 +02:00
fc68829e14 Improve language around ownership of OsString (#602)
Based on discussion in #598.
2023-04-28 10:00:07 +02:00
b051b04afa Use explicit Arc::clone instead of calling .clone() method (#596)
This is to highlight that the clones are cheap: they run custom logic
in the reference counted type, they don’t do a deep clone.
2023-04-27 23:46:09 +02:00
6ade739651 Ensure code blocks are editable (#597)
We should default to making code blocks editable: this ensures
consistent syntax highlighting (see #343) and it allows the instructor
to freely edit anything they want.
2023-04-27 23:45:41 +02:00