1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-19 15:35:37 +02:00
Commit Graph

688 Commits

Author SHA1 Message Date
305bdbb29a Fix slices immutable example () 2023-06-06 09:17:55 +00:00
7257052f0c Minor fixes in async () 2023-06-05 17:12:00 +01:00
a7bef92b36 Mentioned the XKCD source of the joke in enums.md ()
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 ()
* 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 ()
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 () 2023-05-29 16:12:44 +00:00
7ce92303e9 Clarify Default trait and operators ()
* 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 ()
From  via @cydave.
2023-05-26 11:59:12 -04:00
364bb107c0 Missing word in welcome day speaker notes () 2023-05-26 14:51:05 +00:00
2482fa3c56 Update build_all.sh ()
* 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 ()
fix a couple typos 

- welcome page typos corrected
2023-05-24 14:15:46 +00:00
dabf31d0ce Fixing some typos ()
fix some typos
2023-05-24 08:15:08 +00:00
1c1c367940 Add a sentence about lifetime elision ()
add a sentence about lifetime elision
2023-05-23 11:31:35 -04:00
cc813973b1 Update receiver.md ()
* 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 ()
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 ()
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 ()
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 ()
Fix typo in basic/syntax-static-and-const.md.
2023-05-22 09:36:52 +01:00
f02facd56d Add missing newlines around <details> ()
The newlines makes the text more uniform when extracted into the POT
file (spotted while doing ).
2023-05-19 09:43:44 -04:00
83663daaa2 Add the description of the chat-app exercise ()
* 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 ()
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 ()
* 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 () 2023-05-15 22:20:54 +00:00
490b20e245 Link badges to the main branch ()
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 () 2023-05-12 14:34:11 +02:00
9c6bb081d4 Update "Running the course" based on latest experience () 2023-05-11 17:23:01 +00:00
11571d0d1a Add dining philosophers as an async exercise ()
* 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 ()
---------

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 ()
* 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. ()
This was missed in .
2023-05-05 11:25:45 +01:00
d83d1f1c48 Fix pluralisation inconsistency () 2023-05-05 09:57:44 +02:00
d0bf0d7a44 Order Send/Sync before Arc/Mutex ()
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 () 2023-05-04 14:42:08 +00:00
226aa21f3c Use hyphen rather than underscore for gic-version ()
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 ()
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 ()
* `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' () 2023-05-04 07:56:43 -04:00
3b07b4768a Add unit tests to Safe FFI exercise () 2023-05-04 12:20:47 +02:00
09c996ad96 Move closures to the top level ()
move closures to the top level
2023-05-03 09:30:13 -04:00
841359f5df Simplify methods slide ()
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 ()
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 ()
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" ()
* 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 ()
* 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 () 2023-04-29 05:11:12 +02:00
fc68829e14 Improve language around ownership of OsString ()
Based on discussion in .
2023-04-28 10:00:07 +02:00
b051b04afa Use explicit Arc::clone instead of calling .clone() method ()
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 ()
We should default to making code blocks editable: this ensures
consistent syntax highlighting (see ) and it allows the instructor
to freely edit anything they want.
2023-04-27 23:45:41 +02:00
5074b1751c Hint at the list of conversions in FFI exercise ()
I see people struggle a lot with guessing why they need to convert
between all these types. The explanations here should help with that.
2023-04-27 23:45:15 +02:00
f895ffc5a8 Remove exotic string types from scalar type slide ()
When teaching the class, I’ve noticed that raw strings and byte
strings tend to cause confusion. The slide is meant to be a friendly
introduction and show how Rust is similar to other languages like C
and C++. Instead, the string types cause a ton of questions which are
unnecessary at this early point.

The information is still there, but now in the form of a speaker note.
2023-04-27 19:57:07 +02:00