1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-07-11 08:40:31 +02:00
Commit Graph

2418 Commits

Author SHA1 Message Date
28097f39b7 Avoid repetition across slides 2025-07-08 15:19:53 +02:00
3c19ca0150 Formatting 2025-07-08 10:33:03 +02:00
60a6f9e836 Fix code examples 2025-07-08 10:32:52 +02:00
a025490afd Update src/idiomatic/leveraging-the-type-system.md
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
2025-07-08 10:32:39 +02:00
71204b720d Rephrase functional comment 2025-07-07 17:42:53 +02:00
06865d4b4b Embed course outline in the welcome page 2025-07-07 17:34:02 +02:00
ede0c38202 Fix DerefMut example 2025-07-07 17:25:32 +02:00
294c216eb9 Update src/idiomatic/leveraging-the-type-system/newtype-pattern/is-it-encapsulated.md
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
2025-07-07 17:24:23 +02:00
3fe14761e3 Add separate slide on API surface dangers 2025-07-07 16:43:34 +02:00
0745d6503a Update src/idiomatic/leveraging-the-type-system.md
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
2025-07-07 16:20:51 +02:00
7c32ec27aa Add TODO comment 2025-07-07 16:09:36 +02:00
bbd0631fe4 Avoid incorrect attribution to the borrow-checker 2025-07-07 16:05:34 +02:00
41ad768fd6 Be more coincise 2025-07-07 13:34:00 +02:00
93f198051e Use a more coincise symbol to signal compilation errors in slides 2025-07-07 13:33:25 +02:00
14deb7ec4c Formatting. 2025-07-07 13:33:17 +02:00
ee355aebd9 Apply suggestions from code review
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
2025-07-07 13:23:09 +02:00
66b4705d50 Apply suggestions from code review
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
2025-07-07 11:56:43 +02:00
9cc30ac2ee Apply suggestion from @gribozavr
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
2025-07-07 11:47:32 +02:00
4af932ee66 Apply suggestion from @gribozavr
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
2025-07-07 11:47:08 +02:00
0a6bc21cb7 Apply suggestion from @gribozavr
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
2025-07-07 11:47:01 +02:00
38e6dbda2b Apply suggestion from @gribozavr
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
2025-07-07 11:46:49 +02:00
a44eaa9095 Apply suggestion from @gribozavr
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
2025-07-07 11:46:33 +02:00
28d83e5888 Apply suggestion from @gribozavr
Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
2025-07-07 11:46:01 +02:00
447904a96d Add 'Idiomatic Rust' to the course structure section 2025-07-02 17:43:56 +02:00
51d050ebc1 Cross-reference the 'Fundamentals' module with the 'Idiomatic Rust' module 2025-07-02 17:27:34 +02:00
edfe9e8348 Use a terser style on slides. Avoid footnotes 2025-07-02 17:16:42 +02:00
ac219256b5 Parse, don't validate 2025-07-02 16:34:33 +02:00
e262c0f195 Semantic confusion 2025-07-02 15:54:19 +02:00
1508dbb9f0 Introduce 'Idiomatic Rust' module 2025-07-01 16:39:48 +02:00
010b443615 cargo: bump the patch group in /src/bare-metal/aps/examples with 3 updates (#2799)
Bumps the patch group in /src/bare-metal/aps/examples with 3 updates:
[aarch64-rt](https://github.com/google/aarch64-rt),
[smccc](https://github.com/google/smccc) and
[zerocopy](https://github.com/google/zerocopy).

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 11:15:41 +01:00
30e3151f56 Bump crate-ci/typos from 1.33.1 to 1.34.0 (#2798)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.33.1 to
1.34.0.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 11:14:56 +01:00
9599e3f7fb Bump dprint/check from 2.2 to 2.3 (#2797)
Bumps [dprint/check](https://github.com/dprint/check) from 2.2 to 2.3.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 11:13:38 +01:00
fb95fb377d cargo: bump the patch group in /src/exercises/bare-metal/rtc with 3 updates (#2796)
Bumps the patch group in /src/exercises/bare-metal/rtc with 3 updates:
[aarch64-rt](https://github.com/google/aarch64-rt),
[smccc](https://github.com/google/smccc) and
[zerocopy](https://github.com/google/zerocopy).

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 11:02:18 +01:00
6194ac4abb cargo: bump the patch group with 4 updates (#2795)
Bumps the patch group with 4 updates:
[clap](https://github.com/clap-rs/clap),
[googletest](https://github.com/google/googletest-rust),
[zerocopy](https://github.com/google/zerocopy) and
[reqwest](https://github.com/seanmonstar/reqwest).

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 11:01:37 +01:00
5e4feff6d7 Add section about UART driver without safe-mmio back in (#2792)
Having taught the course again since the change to use safe-mmio, it
seems worth keeping this as an intermediate step rather than jumping
straight from pointer arithmetic to safe-mmio's abstractions.
2025-06-30 13:48:32 +01:00
447b31cd45 Remove type annotations from borrowck example (#2791)
These slides are on day 3, I don't think we need the explicit type
annotations at this point.
2025-06-26 15:17:57 -04:00
2e50843812 Move closures section to before libstd sections (#2789)
A lot of stuff in the standard library makes use of closures, so I think
it makes sense to cover those first so that we can more easily reference
libstd functions like `map` and `filter`.
2025-06-26 15:17:32 -04:00
c253b33977 Add note about trait bound in closures exercise (#2788)
I've tried removing this trait bound thinking it's unnecessary only to
then be surprised that it breaks type inference. I think that's worth
calling out to students, so I think a speaker note here would be
appropriate.
2025-06-26 15:09:38 -04:00
39d0588c89 Add direct call to talk in trait implementation slide (#2787)
I think it'd be helpful to also show a direct call to `talk`, so that
it's clear that both trait methods can be called directly.
2025-06-26 15:07:50 -04:00
da28a502bf Make pattern matching exercise code editable (#2786)
I swear I already did this one...

@djmitche it looks like you had removed this `editable` after I last
added it, was there some reason for that?
2025-06-26 15:07:18 -04:00
088744a4c2 Split off function call to make pattern match clearer (#2785)
I think doing the call to `Duration::try_from_secs_f32` in the pattern
match is a bit verbose since the function name is so long. I usually
split this off into a separate variable so that it's easier to see the
pattern match syntax.
2025-06-26 15:01:46 -04:00
40652b6415 Add note about struct-style enum variants in pattern matching (#2784)
Can't forget to demonstrate struct-style enum variants when talking
about pattern matching.
2025-06-26 15:01:04 -04:00
f51f0dbb13 Fix typo in arrays.md (#2781)
According to the error I got from trying out-of-bound index, array
accesses seem to be checked at compile time.

```
   Compiling playground v0.0.1 (/playground)
error: this operation will panic at runtime
 --> src/main.rs:3:5
  |
3 |     a[7] = 0;
  |     ^^^^ index out of bounds: the length is 5 but the index is 7
  |
  = note: `#[deny(unconditional_panic)]` on by default

error: could not compile `playground` (bin "playground") due to 1 previous error
```
2025-06-25 21:08:29 +00:00
bb8b35ab74 Add a speaker note about trying to use a variable as a pattern (#2779) 2025-06-18 17:05:32 -07:00
bb1e1c9414 Updates to bare metal day after teaching it again (#2775)
This fixes some issues running some of the examples, and various other
minor issues I found along the way.
2025-06-12 11:27:22 +01:00
ab26027a79 Fix errors in CODEOWNERS as suggested by GH (#2771) 2025-06-03 15:58:44 +00:00
6ba7f2c654 Reduce wdio verbosity (#2768)
This avoids the need to scroll through pages of useless warnings to find
an actual test failure.
2025-06-03 11:47:38 -04:00
74605c345c cargo: bump reqwest from 0.12.18 to 0.12.19 in the patch group (#2770)
Bumps the patch group with 1 update:
[reqwest](https://github.com/seanmonstar/reqwest).

Updates `reqwest` from 0.12.18 to 0.12.19

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 14:46:13 +01:00
3eb9f98f4a Bump crate-ci/typos from 1.32.0 to 1.33.1 (#2769)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.32.0 to
1.33.1.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 14:45:41 +01:00
0c20fb11f1 Convert dependabot reviewers to CODEOWNERS (#2762)
See
https://github.blog/changelog/2025-04-29-dependabot-reviewers-configuration-option-being-replaced-by-code-owners/.
2025-06-03 14:16:53 +01:00