michael-kerscher
cdfe3e7359
Fix bug in speaker notes that broke navigating to next slide ( #2634 )
...
Change this selector to use the ~= selector to test if a white space
separated word "prev" or "next" is contained
Fixes a speaker notes bug that did not allow going to the next slide in
the speaker notes.
The reason for that is that the "rel" attribute contained "prev"
respective "next prefetch".
See:
https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors#attrvalue_2
This fixes part of #2004 when going to the right (containing
"prefetch").
2025-02-08 11:47:02 +01:00
Nicole L
f9aca3738a
Reorganize borrowck notes and add note about re-borrowing ( #2635 )
...
The speaker notes on the borrowck slide are a bit hard to read since
it's a big block of bulleted points. I've reorganized the notes to be a
bit easier to read by making some of the bullet points nested and by
moving some of the points to the "More to Explore" section. I've also
added a note on re-borrowing since students sometimes ask about it, and
I've added some playground links to demonstrate some of the points.
2025-02-07 17:05:27 -05:00
Nicole L
386757e697
Add note that borrock error can be triggered by direct mutation ( #2629 )
2025-02-07 11:15:00 -08:00
Nicole L
d603faca56
Add link to GridRefIter
example ( #2633 )
2025-02-07 11:04:32 -08:00
Nicole L
c05f0b6f02
Add main
method to code snippet ( #2630 )
...
The code snippet wouldn't compile/run directly because of a missing
`main` method.
Also remove unnecessary `&`.
2025-02-07 10:08:10 +01:00
michael-kerscher
af6dff53c2
update to mdbook-0.4.44 and sync book.js and index.hbs ( #2610 )
...
mdbook in CI pipeline is updated to mdbook-0.4.44
- reran mdbook init --theme
- keep playground improvements
- keep language selector and suggest edit / edit to translation button
text
- improvement: toc is in separate js file, makes html file way smaller
- additionally updated to mdbook-i18n-helpers-0.3.5
relevant upstream changes that are used:
- https://github.com/rust-lang/mdBook/pull/2414
- https://github.com/rust-lang/mdBook/pull/2421
- https://github.com/rust-lang/mdBook/pull/2454
- https://github.com/rust-lang/mdBook/pull/2463
2025-02-07 10:07:41 +01:00
Nicole L
f1459c54e1
Remove slide on shadowing ( #2596 )
2025-02-06 12:39:27 -08:00
Nicole L
72c7618cb4
Replace unimplemented
with todo
( #2594 )
2025-02-06 12:35:28 -08:00
Nicole L
3229fc7c05
Fix tyop in speaker notes ( #2627 )
2025-02-06 11:01:19 -08:00
Nicole L
06bdb40442
Make code in expression evaluation exercise editable ( #2601 )
2025-02-06 11:00:46 -08:00
Nicole L
6a25d7be04
Minor whitespace changes ( #2595 )
2025-02-06 09:52:29 -08:00
Nicole L
e1ed6eaf47
Move struct update syntax to speaker notes ( #2597 )
2025-02-06 09:51:43 -08:00
Nicole L
ca137b4807
Move slide on blocks to beginning of control flow section ( #2598 )
2025-02-06 09:29:44 -08:00
michael-kerscher
4ec257942e
Tests for playground are using a mock response ( #2611 )
...
The official playground quite often provides a timeout error as in
https://github.com/google/comprehensive-rust/issues/2549
This is mocking/overriding the response from the playground for success
and failure messages to avoid the server provided timeouts. As far as I
see most responses from the playground are delivered below 10 seconds
(but varies a lot...)
There still might be timeouts and I know of the following knobs that can
be tuned
- wdio waits for 10 seconds until it aborts the current attemp (e.g. to
wait for the text to be as expected)
347de61d13/tests/wdio.conf.ts (L98)
- another timeout is the 15 second timeout for fetching the result from
the playground - this is not overriden by the mock (currently, pending
https://github.com/webdriverio/webdriverio/issues/14090 which would
allow for an immediate mock response without waiting for the remote
endpoint)
347de61d13/theme/book.js (L31)
2025-02-06 12:33:33 +01:00
Nicole L
553e3c5b10
Add slide reviewing irrefutable patterns ( #2608 )
2025-02-05 16:16:38 -08:00
Nicole L
28ab749338
Add "More to Explore" section to struct patterns slide ( #2604 )
2025-02-05 16:12:01 -08:00
Nicole L
afe206beab
Add division example to expression exercise ( #2605 )
2025-02-05 16:11:42 -08:00
Nicole L
8f01344757
Add speaker note about multiple impl
blocks ( #2606 )
2025-02-05 16:10:55 -08:00
Nicole L
12fb4379f7
Add speaker note with manual derive example ( #2607 )
2025-02-05 16:10:25 -08:00
Nicole L
bb8cbbcb7c
Change values of example array in for loop slide ( #2592 )
2025-02-05 16:09:56 -08:00
Nicole L
cdab1a4ce5
Make nested array example editable ( #2593 )
2025-02-05 16:09:45 -08:00
Dustin J. Mitchell
fd7cb04a62
Improve explanation of lifetimes ( #2584 )
...
This approach seems to balance formalism with understanding. That is, it
doesn't mention contravariance, but suggests that lifetime annotations
in parameters and return values mean "opposite" things. It also
leverages the understanding that types must be specified in function
signatures, and are used to check types in the function body and at call
sites.
2025-02-05 10:58:22 -05:00
michael-kerscher
715a23e7a8
Create install-mdbook.sh and lock to the current versions used in the CI ( #2626 )
...
Move mdbook installation into a script and use exact versions from the
CI.
Update README.md to instruct developers to use the same versions as the
CI to sync both environments.
This is related to #2620 and it fixes #2588
2025-02-05 15:33:28 +01:00
Martin Geisler
c07ac40f90
Split large unsafe function slide ( #2406 )
...
The old slice was doing several things at the same time: demonstrating
both external functions as well as unsafe Rust functions.
We now treat those two topics separately. In addition, the “Calling
Unsafe Functions” heading has become its own slide with a non-crashing
example that shows what can go wrong if an argument is misunderstood
in a call to an unsafe function. The old example didn’t actually
illustrate the danger clearly: it would produce mangled UTF-8 output,
which the Playground server refuses to print.
Part of #2445 .
---------
Co-authored-by: Dustin J. Mitchell <djmitche@google.com>
Co-authored-by: Andrew Walbran <qwandor@google.com>
2025-02-05 14:00:14 +00:00
michael-kerscher
153bd63cc0
tests: rename to generic-page.test.ts as only *.test.js is tested ( #2625 )
...
the filename without .test. was introduced in #2621
2025-02-04 08:19:53 -05:00
michael-kerscher
2cf9a35b23
Check if menu bar buttons are display and functionality works ( #2621 )
...
Test the main page for existence of
- theme button visible
- clicking shows the list of themes
- search button visible
- and tests successful search for "Welcome"
- language button visible
- clicking shows the list of languages
this is testing functionality missing in dev environments in
https://github.com/google/comprehensive-rust/issues/2588 and is relevant
for https://github.com/google/comprehensive-rust/issues/2620
2025-02-04 10:36:34 +01:00
dependabot[bot]
466f213927
cargo: bump openssl from 0.10.66 to 0.10.70 in the cargo group ( #2624 )
...
Bumps the cargo group with 1 update:
[openssl](https://github.com/sfackler/rust-openssl ).
Updates `openssl` from 0.10.66 to 0.10.70
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sfackler/rust-openssl/releases ">openssl's
releases</a>.</em></p>
<blockquote>
<h2>openssl v0.10.70</h2>
<h2>What's Changed</h2>
<ul>
<li>Attempt to fix CI by pinning to the Ubuntu 22.04 image by <a
href="https://github.com/alex "><code>@alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2357 ">sfackler/rust-openssl#2357</a></li>
<li>Remove EC_METHOD and EC_GROUP_new for LibreSSL 4.1 by <a
href="https://github.com/botovq "><code>@botovq</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2356 ">sfackler/rust-openssl#2356</a></li>
<li>Test against 3.4.0 final release by <a
href="https://github.com/alex "><code>@alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2359 ">sfackler/rust-openssl#2359</a></li>
<li>Expose <code>SslMethod::{dtls_client,dtls_server}</code> by <a
href="https://github.com/alex "><code>@alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2358 ">sfackler/rust-openssl#2358</a></li>
<li>Fix lifetimes in ssl::select_next_proto by <a
href="https://github.com/sfackler "><code>@sfackler</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2360 ">sfackler/rust-openssl#2360</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.69...openssl-v0.10.70 ">https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.69...openssl-v0.10.70 </a></p>
<h2>openssl v0.10.69</h2>
<h2>What's Changed</h2>
<ul>
<li>build(deps): Update <code>openssl-macro</code> to version
<code>0.1.1</code> by <a
href="https://github.com/caspermeijn "><code>@caspermeijn</code></a> in
<a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2324 ">sfackler/rust-openssl#2324</a></li>
<li>Enable set_alpn_select_callback for BoringSSL by <a
href="https://github.com/ViktoriiaKovalova "><code>@ViktoriiaKovalova</code></a>
in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2327 ">sfackler/rust-openssl#2327</a></li>
<li>Switch the test to use prime256v1 based key by <a
href="https://github.com/dcermak "><code>@dcermak</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2330 ">sfackler/rust-openssl#2330</a></li>
<li>Expose EVP_DigestSqueeze from Hasher by <a
href="https://github.com/initsecret "><code>@initsecret</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2275 ">sfackler/rust-openssl#2275</a></li>
<li>Expose SSL_CTX_load_verify_locations by <a
href="https://github.com/sfackler "><code>@sfackler</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2353 ">sfackler/rust-openssl#2353</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/caspermeijn "><code>@caspermeijn</code></a>
made their first contribution in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2324 ">sfackler/rust-openssl#2324</a></li>
<li><a
href="https://github.com/ViktoriiaKovalova "><code>@ViktoriiaKovalova</code></a>
made their first contribution in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2327 ">sfackler/rust-openssl#2327</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.68...openssl-v0.10.69 ">https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.68...openssl-v0.10.69 </a></p>
<h2>openssl-v0.10.68</h2>
<h2>What's Changed</h2>
<ul>
<li>fixes <a
href="https://redirect.github.com/sfackler/rust-openssl/issues/2317 ">#2317</a>
-- restore compatibility with our MSRV and release openssl 0.9.68 by <a
href="https://github.com/alex "><code>@alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2318 ">sfackler/rust-openssl#2318</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.67...openssl-v0.10.68 ">https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.67...openssl-v0.10.68 </a></p>
<h2>openssl-v0.10.67</h2>
<h2>What's Changed</h2>
<ul>
<li>Added a utility function to ensure we never have an issue with
0-length slices from pointers again by <a
href="https://github.com/alex "><code>@alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2268 ">sfackler/rust-openssl#2268</a></li>
<li>Fix CI for the latest rustc by <a
href="https://github.com/alex "><code>@alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2271 ">sfackler/rust-openssl#2271</a></li>
<li>Add binding for EVP_DigestSqueeze by <a
href="https://github.com/initsecret "><code>@initsecret</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2270 ">sfackler/rust-openssl#2270</a></li>
<li>libressl 4.0: const correctness for X509_LOOKUP_METHOD by <a
href="https://github.com/botovq "><code>@botovq</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2276 ">sfackler/rust-openssl#2276</a></li>
<li>Bump hex dev-dependency version by <a
href="https://github.com/alex "><code>@alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2277 ">sfackler/rust-openssl#2277</a></li>
<li>Raise bindgen version by <a
href="https://github.com/alex "><code>@alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2278 ">sfackler/rust-openssl#2278</a></li>
<li>Ensure Rsa::check_key doesn't leave errors on the stack by <a
href="https://github.com/alex "><code>@alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2279 ">sfackler/rust-openssl#2279</a></li>
<li>Update some docs to use the corresponds macro by <a
href="https://github.com/rushilmehra "><code>@rushilmehra</code></a> in
<a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2282 ">sfackler/rust-openssl#2282</a></li>
<li>Don't leave errors on the stack in
<code>MdCtxRef::digest_verify_final</code> by <a
href="https://github.com/alex "><code>@alex</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2283 ">sfackler/rust-openssl#2283</a></li>
<li>Adjustments for LibreSSL 4 by <a
href="https://github.com/botovq "><code>@botovq</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2287 ">sfackler/rust-openssl#2287</a></li>
<li>Explicit rustfmt config by <a
href="https://github.com/kornelski "><code>@kornelski</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2285 ">sfackler/rust-openssl#2285</a></li>
<li>add basic EVP_KDF bindings by <a
href="https://github.com/reaperhulk "><code>@reaperhulk</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2289 ">sfackler/rust-openssl#2289</a></li>
<li>add ossl3 thread pool bindings by <a
href="https://github.com/reaperhulk "><code>@reaperhulk</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2293 ">sfackler/rust-openssl#2293</a></li>
<li>add argon2id support for ossl 3.2+ by <a
href="https://github.com/reaperhulk "><code>@reaperhulk</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2290 ">sfackler/rust-openssl#2290</a></li>
<li>fix 3.2.0 thread support and simplify by <a
href="https://github.com/reaperhulk "><code>@reaperhulk</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2294 ">sfackler/rust-openssl#2294</a></li>
<li>add libctx arg to argon2id by <a
href="https://github.com/reaperhulk "><code>@reaperhulk</code></a> in <a
href="https://redirect.github.com/sfackler/rust-openssl/pull/2295 ">sfackler/rust-openssl#2295</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a4d399b0f1
"><code>a4d399b</code></a>
Release openssl v0.10.70</li>
<li><a
href="c9a33e2860
"><code>c9a33e2</code></a>
Release openssl-sys v0.9.105</li>
<li><a
href="f014afb230
"><code>f014afb</code></a>
Merge pull request <a
href="https://redirect.github.com/sfackler/rust-openssl/issues/2360 ">#2360</a>
from sfackler/fix-alpn-lifetimes</li>
<li><a
href="8e6e30bbf7
"><code>8e6e30b</code></a>
Fix lifetimes in ssl::select_next_proto</li>
<li><a
href="1aff2801ca
"><code>1aff280</code></a>
Merge pull request <a
href="https://redirect.github.com/sfackler/rust-openssl/issues/2358 ">#2358</a>
from alex/expose-dlts</li>
<li><a
href="16ca5b278b
"><code>16ca5b2</code></a>
Merge pull request <a
href="https://redirect.github.com/sfackler/rust-openssl/issues/2359 ">#2359</a>
from sfackler/alex-patch-1</li>
<li><a
href="4c9fbb0c18
"><code>4c9fbb0</code></a>
Test against 3.4.0 final release</li>
<li><a
href="5ecb31d3fd
"><code>5ecb31d</code></a>
Update openssl/src/ssl/mod.rs</li>
<li><a
href="4830f5bb93
"><code>4830f5b</code></a>
Expose <code>SslMethod::{dtls_client,dtls_server}</code></li>
<li><a
href="bab03c4093
"><code>bab03c4</code></a>
Merge pull request <a
href="https://redirect.github.com/sfackler/rust-openssl/issues/2356 ">#2356</a>
from botovq/rm-ec-method</li>
<li>Additional commits viewable in <a
href="https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.66...openssl-v0.10.70 ">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/google/comprehensive-rust/network/alerts ).
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 13:57:43 -05:00
Nicole L
abf9393e60
Remove trait bound on VerbosityFilter
in the generic data types slide ( #2603 )
...
It's generally more idiomatic in Rust to not have trait bounds on the
data type itself. I think we better demonstrate how trait bounds are
used in impl blocks with generic data types in the impl block below the
struct definition. I've also added a speaker note to call this out if
students ask.
2025-02-03 13:57:24 -05:00
Frances Wingerter
43e1cd6c49
cxx: fix build with CARGO_TARGET_DIR set ( #2542 )
...
Fixes #2335 .
2025-02-03 17:23:35 +00:00
dependabot[bot]
4218c95e8d
cargo: bump the patch group in /src/bare-metal/aps/examples with 2 updates ( #2616 )
...
Bumps the patch group in /src/bare-metal/aps/examples with 2 updates:
[log](https://github.com/rust-lang/log ) and
[cc](https://github.com/rust-lang/cc-rs ).
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-01 18:41:42 +00:00
dependabot[bot]
87d4701645
cargo: bump the patch group in /src/exercises/bare-metal/rtc with 2 updates ( #2618 )
...
Bumps the patch group in /src/exercises/bare-metal/rtc with 2 updates:
[log](https://github.com/rust-lang/log ) and
[cc](https://github.com/rust-lang/cc-rs ).
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-01 18:41:26 +00:00
dependabot[bot]
a8d8d2eaa7
cargo: bump bitflags from 2.6.0 to 2.8.0 in /src/exercises/bare-metal/rtc in the minor group ( #2617 )
...
Bumps the minor group in /src/exercises/bare-metal/rtc with 1 update:
[bitflags](https://github.com/bitflags/bitflags ).
Updates `bitflags` from 2.6.0 to 2.8.0
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-01 18:18:38 +00:00
dependabot[bot]
0e5ee9db00
cargo: bump bitflags from 2.6.0 to 2.8.0 in /src/bare-metal/aps/examples in the minor group ( #2615 )
...
Bumps the minor group in /src/bare-metal/aps/examples with 1 update:
[bitflags](https://github.com/bitflags/bitflags ).
Updates `bitflags` from 2.6.0 to 2.8.0
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-01 18:17:57 +00:00
dependabot[bot]
010bd291c0
cargo: bump the patch group with 8 updates ( #2614 )
...
Bumps the patch group with 8 updates:
| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap ) | `4.5.23` | `4.5.27` |
| [log](https://github.com/rust-lang/log ) | `0.4.22` | `0.4.25` |
| [mdbook](https://github.com/rust-lang/mdBook ) | `0.4.43` | `0.4.44` |
| [serde_json](https://github.com/serde-rs/json ) | `1.0.134` | `1.0.138`
|
| [fantoccini](https://github.com/jonhoo/fantoccini ) | `0.21.3` |
`0.21.4` |
| [thiserror](https://github.com/dtolnay/thiserror ) | `2.0.9` | `2.0.11`
|
| [cxx](https://github.com/dtolnay/cxx ) | `1.0.136` | `1.0.137` |
| [cxx-build](https://github.com/dtolnay/cxx ) | `1.0.136` | `1.0.137` |
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-01 18:17:30 +00:00
dependabot[bot]
9821e811f4
Bump crate-ci/typos from 1.29.0 to 1.29.5 ( #2612 )
...
Bumps [crate-ci/typos](https://github.com/crate-ci/typos ) from 1.29.0 to
1.29.5.
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-01 18:13:54 +00:00
andriyDev
347de61d13
Move the "Trait Bounds" slide right after "Generic Functions". ( #2589 )
...
The "Generic Data Types" slide now uses trait bounds, which makes it
very confusing to explain. (e.g., "ignore this trait bound stuff while I
explain why we need to stutter to describe the generic args on an impl
block").
Also in the "Generic Functions" slide, the speaker notes talks about how
we essentially need to treat the generic args as black boxes - this is
probably more important to address then talking about all the ways you
can make things generic.
2025-01-30 01:34:45 +00:00
Martin Geisler
deae2e2d53
Reduce vertical space slightly in UART examples ( #2407 )
...
Co-authored-by: Dustin J. Mitchell <djmitche@google.com>
2025-01-27 13:40:48 -05:00
Dustin J. Mitchell
a846003665
Switch lifetime and variable names so they are different ( #2586 )
...
This helps clarify that the lifetime and variables names do not need to
match, but sticks to related themes (doc / document) for human clarity.
As suggested by @fw-immunant in
https://github.com/google/comprehensive-rust/pull/2585#pullrequestreview-2569184433 ,
which subsequently auto-merged.
2025-01-23 14:55:59 -08:00
Dustin J. Mitchell
9c03d51b74
Add a picture to Rc ( #2583 )
...
I suppose my `svgbob` skills leave a bit to be desired, but I think the
meaning is clear:

Now that I look through the `Rc` implementation, there's a weak count
for every strong count, so the `weak: 0` here is inaccurate. But, maybe
this is too much of an implementation detail? Should I just concentrate
on strong refs? I suppose I could put a `...` in that upper-right box,
to suggest there's more going on here?
2025-01-23 09:28:20 -05:00
Dustin J. Mitchell
4ce87c5473
Improve tuple destructuring ( #2582 )
...
This slide had two code samples, neither of which had a `main` and thus
neither of which would run. This removes the first (which is redundant
to one a few slides earlier), adds a `main`, and expands the second to
use a 3-tuple.
2025-01-23 09:23:08 -05:00
Dustin J. Mitchell
b3734de08b
Include the From trait in the generic traits slide ( #2570 )
...
This saves a bunch of tabbing back and forth from the docs to the slide.
2025-01-23 09:43:43 +01:00
Dustin J. Mitchell
b3c57e4cbf
Be clear that the methods-and-traits exercise does not require generics ( #2568 )
...
When teaching the course, I got a little tripped up thinking students
would need to make the `VerbosityFilter` generic over `Logger`. Let's be
clearer that this is not required, and will be described later.
This also updates the generic-types slide to repeat the exercise,
completing that thought.
2025-01-23 09:40:59 +01:00
Dustin J. Mitchell
15e46379b1
Clarify struct-lifetimes slide ( #2585 )
...
In teaching the course, the verbal distinction between "doc" and "dog"
was not clear, so this PR moves away from those symbols.
This also makes the Highlight struct a little more substantial, and
replaces `erase` with a simple call to `drop` to keep the example short.
2025-01-23 09:35:11 +01:00
Dustin J. Mitchell
9f9f845acc
Break closures into its own segment ( #2574 )
...
In teaching the course last week, we broke here, partly due to time
constraints, but partly because this is a pretty mind-bending topic to
tackle at the end of an information-dense day. A break helps, and
spreading the content over a few slides helps as well.
By the timings in the course, this leaves day 2 looking like
*Fundamentals // Day 2 Morning*
_1 hour and 55 minutes: (1 hour and 10 minutes short)_
* Welcome - _3 minutes_
* Pattern Matching - _45 minutes_
* Methods and Traits - _50 minutes_
*Fundamentals // Day 2 Afternoon*
_3 hours and 30 minutes (⏰ *30 minutes too long*)_
* Welcome - _0 minutes_
* Generics - _45 minutes_
* Standard Library Types - _1 hour_
* Standard Library Traits - _1 hour_
* Closures - _20 minutes_
Maybe we should move generics to the morning session?
2025-01-23 09:32:59 +01:00
Dustin J. Mitchell
3b7442a498
Split let control flow into mutliple sub-slides ( #2567 )
...
There are three kinds of syntax here, making for a very long and
hard-to-navigate slide. Splitting it up helps!
2025-01-22 20:06:53 +01:00
Dustin J. Mitchell
f19bb8f10d
Briefly touch on match ergonomics ( #2581 )
...
This is done in the speaker notes as it's a relatively minor point, but
one that students should have in the back of their mind when they
wonder, "hey, how does a `&Foo` match against `Foo` patterns??"
2025-01-22 17:47:23 +01:00
Dustin J. Mitchell
5b03ea6ca5
Add empty structs ( #2569 )
...
This should be quick, but introduces the syntax and the concept of a
ZST.
2025-01-22 17:45:01 +01:00
dependabot[bot]
7f712b5292
Bump undici from 6.21.0 to 6.21.1 in /tests in the npm_and_yarn group across 1 directory ( #2580 )
...
Bumps the npm_and_yarn group with 1 update in the /tests directory:
[undici](https://github.com/nodejs/undici ).
Updates `undici` from 6.21.0 to 6.21.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nodejs/undici/releases ">undici's
releases</a>.</em></p>
<blockquote>
<h2>v6.21.1</h2>
<h1>⚠️ Security Release ⚠️ </h1>
<p>Fixes CVE CVE-2025-22150 <a
href="https://github.com/nodejs/undici/security/advisories/GHSA-c76h-2ccp-4975 ">https://github.com/nodejs/undici/security/advisories/GHSA-c76h-2ccp-4975 </a>
(embargoed until 22-01-2025).</p>
<h2>What's Changed</h2>
<ul>
<li>fix(<a
href="https://redirect.github.com/nodejs/undici/issues/3736 ">#3736</a>):
back-port 183f8e9 to v6.x by <a
href="https://github.com/ggoodman "><code>@ggoodman</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3855 ">nodejs/undici#3855</a></li>
<li>fix(<a
href="https://redirect.github.com/nodejs/undici/issues/3817 ">#3817</a>):
send servername for SNI on TLS (<a
href="https://redirect.github.com/nodejs/undici/issues/3821 ">#3821</a>)
[backport] by <a
href="https://github.com/metcoder95 "><code>@metcoder95</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3864 ">nodejs/undici#3864</a></li>
<li>fix: sending formdata bodies with http2 (<a
href="https://redirect.github.com/nodejs/undici/issues/3863 ">#3863</a>)
[backport] by <a
href="https://github.com/metcoder95 "><code>@metcoder95</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3866 ">nodejs/undici#3866</a></li>
<li>[Backport v6.x] fix: Fixed the issue that there is no running
request when http2 goaway by <a
href="https://github.com/github-actions "><code>@github-actions</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/3877 ">nodejs/undici#3877</a></li>
<li>types: [backport] Update return type of RetryCallback (<a
href="https://redirect.github.com/nodejs/undici/issues/3851 ">#3851</a>)
by <a href="https://github.com/metcoder95 "><code>@metcoder95</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/3876 ">nodejs/undici#3876</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v6.21.0...v6.21.1 ">https://github.com/nodejs/undici/compare/v6.21.0...v6.21.1 </a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e260e7bb17
"><code>e260e7b</code></a>
Bumped v6.21.1</li>
<li><a
href="c3acc6050b
"><code>c3acc60</code></a>
Merge commit from fork</li>
<li><a
href="2414bc9f7d
"><code>2414bc9</code></a>
Update return type of RetryCallback (<a
href="https://redirect.github.com/nodejs/undici/issues/3851 ">#3851</a>)
(<a
href="https://redirect.github.com/nodejs/undici/issues/3876 ">#3876</a>)</li>
<li><a
href="be8cd0afa0
"><code>be8cd0a</code></a>
[Backport v6.x] fix: Fixed the issue that there is no running request
when ht...</li>
<li><a
href="ee6176cd2e
"><code>ee6176c</code></a>
fix: sending formdata bodies with http2 (<a
href="https://redirect.github.com/nodejs/undici/issues/3863 ">#3863</a>)
[backport] (<a
href="https://redirect.github.com/nodejs/undici/issues/3866 ">#3866</a>)</li>
<li><a
href="a0220f14bf
"><code>a0220f1</code></a>
fix(<a
href="https://redirect.github.com/nodejs/undici/issues/3817 ">#3817</a>):
send servername for SNI on TLS (<a
href="https://redirect.github.com/nodejs/undici/issues/3821 ">#3821</a>)
[backport] (<a
href="https://redirect.github.com/nodejs/undici/issues/3864 ">#3864</a>)</li>
<li><a
href="353ab63188
"><code>353ab63</code></a>
fix(<a
href="https://redirect.github.com/nodejs/undici/issues/3736 ">#3736</a>):
back-port 183f8e9 to v6.x (<a
href="https://redirect.github.com/nodejs/undici/issues/3855 ">#3855</a>)</li>
<li>See full diff in <a
href="https://github.com/nodejs/undici/compare/v6.21.0...v6.21.1 ">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/google/comprehensive-rust/network/alerts ).
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-22 03:58:31 -05:00
andriyDev
3cca4735c4
Add return statements to the Fibonacci exercise. ( #2576 )
...
At this point in the course, we have not explained return statements.
Better to have it set up to avoid questions!
2025-01-21 16:15:13 +00:00
Martin Geisler
536cdf378f
Fix typo in TRANSLATIONS.md ( #2578 )
2025-01-21 08:49:54 +00:00