1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-03-21 06:36:31 +02:00

1179 Commits

Author SHA1 Message Date
Andrew Walbran
ec47ec2b5f
Update udev rule for microbit. (#2217)
The subsystem seems to have changed with a newer version of udev, and
using logindev and uaccess rather than plugdev is consistent with how
other similar devices are handled.
2024-07-12 12:27:26 +01:00
Jason Lin
5d69d8c87b
Remove lifetime trait bound on ProtoMessage (#2187)
The lifetime trait bound is unncessary, and the code compiles without
it.
2024-07-09 21:20:00 +00:00
Max Heller
550cc39ee4
fix </detail> typo (#2209) 2024-07-09 15:46:24 +00:00
Henri F
90acb23506
Fix a single typo on translations.md (#2206) 2024-07-09 10:26:38 +01:00
Henri F
23c30a9e39
Fix broken links to Arabic translation (#2204)
#445
2024-07-08 18:44:34 +00:00
dependabot[bot]
eeea2ec2ac
cargo: bump the patch group with 3 updates (#2201)
Bumps the patch group with 3 updates:
[serde](https://github.com/serde-rs/serde),
[serde_json](https://github.com/serde-rs/json) 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>
2024-07-08 08:56:03 +01:00
dependabot[bot]
a95c9dd6d2
cargo: bump buddy_system_allocator from 0.9.1 to 0.10.0 in the minor group (#2200)
Bumps the minor group with 1 update:
[buddy_system_allocator](https://github.com/rcore-os/buddy_system_allocator).

Updates `buddy_system_allocator` from 0.9.1 to 0.10.0

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-08 08:55:08 +01:00
dependabot[bot]
2998282e73
cargo: bump cc from 1.0.103 to 1.0.105 in /src/exercises/bare-metal/rtc in the patch group (#2197)
Bumps the patch group in /src/exercises/bare-metal/rtc with 1 update:
[cc](https://github.com/rust-lang/cc-rs).

Updates `cc` from 1.0.103 to 1.0.105

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-08 08:54:42 +01:00
dependabot[bot]
9688fa993c
cargo: bump buddy_system_allocator from 0.9.1 to 0.10.0 in /src/bare-metal/alloc-example in the minor group (#2199)
Bumps the minor group in /src/bare-metal/alloc-example with 1 update:
[buddy_system_allocator](https://github.com/rcore-os/buddy_system_allocator).

Updates `buddy_system_allocator` from 0.9.1 to 0.10.0

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-08 08:53:21 +01:00
dependabot[bot]
104abced36
cargo: bump cc from 1.0.103 to 1.0.105 in /src/bare-metal/aps/examples in the patch group (#2198)
Bumps the patch group in /src/bare-metal/aps/examples with 1 update:
[cc](https://github.com/rust-lang/cc-rs).

Updates `cc` from 1.0.103 to 1.0.105

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-08 08:52:51 +01:00
Younies Mahmoud
a976603da5
First step in Arabic Translation (#2193)
Part of : #445
2024-07-05 22:40:03 -07:00
Jason Lin
a64516a7e6
Fix issues in std-types/result.md (#2186)
The expression excercise is using the standard `Result` type instead of
`Res`.

Co-authored-by: Jason Lin <lxj@google.com>
2024-07-05 15:04:46 +00:00
Younies Mahmoud
25b9dff9d0
Enhance Speaker Note: Warning for Rust Installation via Homebrew (#2191) 2024-07-05 10:50:13 -04:00
Henri F
a20b8754a5
Publish Ukrainian translation to language selector (#2183)
Closes #836
2024-07-03 14:04:54 -07:00
Henri F
ff916ebfb6
Fix small typo (#2185) 2024-07-03 16:17:35 -04:00
Henri F
1a1480ea04
Publish Japanese translation to language selector (#2182)
#1463 #652
2024-07-01 10:31:25 -07:00
dependabot[bot]
5119271045
cargo: bump bitflags from 2.5.0 to 2.6.0 in /src/bare-metal/aps/examples in the minor group (#2177)
Bumps the minor group in /src/bare-metal/aps/examples with 1 update:
[bitflags](https://github.com/bitflags/bitflags).

Updates `bitflags` from 2.5.0 to 2.6.0

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 12:36:30 +01:00
dependabot[bot]
b419881bc0
cargo: bump bitflags from 2.5.0 to 2.6.0 in /src/exercises/bare-metal/rtc in the minor group (#2180)
Bumps the minor group in /src/exercises/bare-metal/rtc with 1 update:
[bitflags](https://github.com/bitflags/bitflags).

Updates `bitflags` from 2.5.0 to 2.6.0

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 11:56:06 +01:00
dependabot[bot]
f046d4860d
cargo: bump the patch group in /src/bare-metal/aps/examples with 2 updates (#2178)
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>
2024-07-01 11:55:15 +01:00
dependabot[bot]
df33476ee6
cargo: bump the patch group in /src/exercises/bare-metal/rtc with 2 updates (#2181)
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).

Updates `log` from 0.4.21 to 0.4.22
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/log/blob/master/CHANGELOG.md">log's
changelog</a>.</em></p>
<blockquote>
<h2>[0.4.22] - 2024-06-27</h2>
<h2>What's Changed</h2>
<ul>
<li>Add some clarifications to the library docs by <a
href="https://github.com/KodrAus"><code>@​KodrAus</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/620">rust-lang/log#620</a></li>
<li>Add links to <code>colog</code> crate by <a
href="https://github.com/chrivers"><code>@​chrivers</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/621">rust-lang/log#621</a></li>
<li>adding line_number test + updating some testing infrastructure by <a
href="https://github.com/DIvkov575"><code>@​DIvkov575</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/619">rust-lang/log#619</a></li>
<li>Clarify the actual set of functions that can race in _racy variants
by <a href="https://github.com/KodrAus"><code>@​KodrAus</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/623">rust-lang/log#623</a></li>
<li>Replace deprecated std::sync::atomic::spin_loop_hint() by <a
href="https://github.com/Catamantaloedis"><code>@​Catamantaloedis</code></a>
in <a
href="https://redirect.github.com/rust-lang/log/pull/625">rust-lang/log#625</a></li>
<li>Check usage of max_level features by <a
href="https://github.com/Thomasdezeeuw"><code>@​Thomasdezeeuw</code></a>
in <a
href="https://redirect.github.com/rust-lang/log/pull/627">rust-lang/log#627</a></li>
<li>Remove unneeded import by <a
href="https://github.com/Thomasdezeeuw"><code>@​Thomasdezeeuw</code></a>
in <a
href="https://redirect.github.com/rust-lang/log/pull/628">rust-lang/log#628</a></li>
<li>Loosen orderings for logger initialization in <a
href="https://redirect.github.com/rust-lang/log/pull/632">rust-lang/log#632</a>.
Originally by <a
href="https://github.com/pwoolcoc"><code>@​pwoolcoc</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/599">rust-lang/log#599</a></li>
<li>Use Location::caller() for file and line info in <a
href="https://redirect.github.com/rust-lang/log/pull/633">rust-lang/log#633</a>.
Originally by <a
href="https://github.com/Cassy343"><code>@​Cassy343</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/520">rust-lang/log#520</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/chrivers"><code>@​chrivers</code></a>
made their first contribution in <a
href="https://redirect.github.com/rust-lang/log/pull/621">rust-lang/log#621</a></li>
<li><a href="https://github.com/DIvkov575"><code>@​DIvkov575</code></a>
made their first contribution in <a
href="https://redirect.github.com/rust-lang/log/pull/619">rust-lang/log#619</a></li>
<li><a
href="https://github.com/Catamantaloedis"><code>@​Catamantaloedis</code></a>
made their first contribution in <a
href="https://redirect.github.com/rust-lang/log/pull/625">rust-lang/log#625</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/rust-lang/log/compare/0.4.21...0.4.22">https://github.com/rust-lang/log/compare/0.4.21...0.4.22</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d5ba2cfee9"><code>d5ba2cf</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/634">#634</a>
from rust-lang/cargo/0.4.22</li>
<li><a
href="d1a8306aad"><code>d1a8306</code></a>
prepare for 0.4.22 release</li>
<li><a
href="46894ef229"><code>46894ef</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/633">#633</a>
from rust-lang/feat/panic-info</li>
<li><a
href="e0d389c9ca"><code>e0d389c</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/632">#632</a>
from rust-lang/feat/loosen-atomics</li>
<li><a
href="c9e5e13e9b"><code>c9e5e13</code></a>
use Location::caller() for file and line info</li>
<li><a
href="507b672660"><code>507b672</code></a>
loosen orderings for logger initialization</li>
<li><a
href="c879b011a8"><code>c879b01</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/628">#628</a>
from Thomasdezeeuw/fix-warnings</li>
<li><a
href="405fdb4d9f"><code>405fdb4</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/627">#627</a>
from Thomasdezeeuw/check-features</li>
<li><a
href="1307ade112"><code>1307ade</code></a>
Remove unneeded import</li>
<li><a
href="710560ecb7"><code>710560e</code></a>
Don't use --all-features in CI</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-lang/log/compare/0.4.21...0.4.22">compare
view</a></li>
</ul>
</details>
<br />

Updates `cc` from 1.0.100 to 1.0.103
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/cc-rs/releases">cc's
releases</a>.</em></p>
<blockquote>
<h2>cc-v1.0.103</h2>
<h3>Other</h3>
<ul>
<li>Fix compilation for wasm: env WASI_SYSROOT should be optional (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1114">#1114</a>)</li>
</ul>
<h2>cc-v1.0.102</h2>
<h3>Other</h3>
<ul>
<li>Fix invalid wasi targets compatibility (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1105">#1105</a>)</li>
<li>Speedup regenerate-target-info and regenerate-windows-sys (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1110">#1110</a>)</li>
</ul>
<h2>cc-v1.0.101</h2>
<h3>Other</h3>
<ul>
<li>Use <code>Build::getenv</code> instead of <code>env::var*</code> in
anywhere that makes sense (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1103">#1103</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md">cc's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/rust-lang/cc-rs/compare/cc-v1.0.102...cc-v1.0.103">1.0.103</a>
- 2024-06-30</h2>
<h3>Other</h3>
<ul>
<li>Fix compilation for wasm: env WASI_SYSROOT should be optional (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1114">#1114</a>)</li>
</ul>
<h2><a
href="https://github.com/rust-lang/cc-rs/compare/cc-v1.0.101...cc-v1.0.102">1.0.102</a>
- 2024-06-29</h2>
<h3>Other</h3>
<ul>
<li>Fix invalid wasi targets compatibility (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1105">#1105</a>)</li>
<li>Speedup regenerate-target-info and regenerate-windows-sys (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1110">#1110</a>)</li>
</ul>
<h2><a
href="https://github.com/rust-lang/cc-rs/compare/cc-v1.0.100...cc-v1.0.101">1.0.101</a>
- 2024-06-25</h2>
<h3>Other</h3>
<ul>
<li>Use <code>Build::getenv</code> instead of <code>env::var*</code> in
anywhere that makes sense (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1103">#1103</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="75d47e5e68"><code>75d47e5</code></a>
chore: release (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1116">#1116</a>)</li>
<li><a
href="fe9ccd18fe"><code>fe9ccd1</code></a>
Fix compilation for wasm: env WASI_SYSROOT should be optional (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1114">#1114</a>)</li>
<li><a
href="bffb5c0096"><code>bffb5c0</code></a>
chore: release (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1112">#1112</a>)</li>
<li><a
href="9d4467794a"><code>9d44677</code></a>
Fix invalid wasi targets compatibility (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1105">#1105</a>)</li>
<li><a
href="853fa8b421"><code>853fa8b</code></a>
Speedup regenerate-target-info and regenerate-windows-sys (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1110">#1110</a>)</li>
<li><a
href="bcb7cbedd0"><code>bcb7cbe</code></a>
chore: release (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1106">#1106</a>)</li>
<li><a
href="4cb5b94e44"><code>4cb5b94</code></a>
Use <code>Build::getenv</code> instead of <code>env::var*</code> in
anywhere that makes sense (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1103">#1103</a>)</li>
<li>See full diff in <a
href="https://github.com/rust-lang/cc-rs/compare/cc-v1.0.100...cc-v1.0.103">compare
view</a></li>
</ul>
</details>
<br />


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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 11:53:20 +01:00
Andrew Walbran
b1a0287ec5
Fix name of trait for embedded-hal 1.0 and add missing import (#2174) 2024-06-26 09:55:11 -04:00
Jonathan Daniel
31d1182831
Update the link to the first dining philosophers exercise (#2153)
The current one leads to the same page.

https://google.github.io/comprehensive-rust/concurrency/async-exercises/dining-philosophers.html
2024-06-25 13:50:20 +00:00
Henri F
2641370f34
Update index.md with language selection instructions and translations link (#2131) 2024-06-25 09:45:04 -04:00
Andrew Walbran
f496303f2c
Add missing word (#2172) 2024-06-25 09:40:56 -04:00
dependabot[bot]
71d31410ed
cargo: bump cc from 1.0.99 to 1.0.100 in /src/bare-metal/aps/examples in the patch group (#2157)
Bumps the patch group in /src/bare-metal/aps/examples with 1 update:
[cc](https://github.com/rust-lang/cc-rs).

Updates `cc` from 1.0.99 to 1.0.100

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 10:21:24 +00:00
dependabot[bot]
16bafaf635
cargo: bump microbit-v2 from 0.14.0 to 0.15.0 in /src/bare-metal/microcontrollers/examples in the minor group (#2158)
Bumps the minor group in /src/bare-metal/microcontrollers/examples with
1 update: [microbit-v2](https://github.com/nrf-rs/microbit).

Updates `microbit-v2` from 0.14.0 to 0.15.0

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 10:20:20 +00:00
dependabot[bot]
d490d08f9d
cargo: bump the minor group across 1 directory with 2 updates (#2169)
Bumps the minor group with 2 updates in the
/src/exercises/bare-metal/compass directory:
[lsm303agr](https://github.com/eldruin/lsm303agr-rs) and
[microbit-v2](https://github.com/nrf-rs/microbit).

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 11:13:47 +01:00
dependabot[bot]
675493cb26
cargo: bump cc from 1.0.99 to 1.0.100 in /src/exercises/bare-metal/rtc in the patch group (#2156)
Bumps the patch group in /src/exercises/bare-metal/rtc with 1 update:
[cc](https://github.com/rust-lang/cc-rs).

Updates `cc` from 1.0.99 to 1.0.100

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-25 10:07:16 +00:00
dependabot[bot]
45e4b167e9
cargo: bump the patch group across 1 directory with 2 updates (#2170)
Bumps the patch group with 2 updates in the / directory:
[serde_json](https://github.com/serde-rs/json) 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>
2024-06-25 10:50:39 +01:00
Andrew Walbran
08bb2cf89a
Update installation instructions for cargo-embed (#2167) 2024-06-25 08:57:41 +00:00
Luke Yeh
1fb284640e
Add a map_err in speaker notes (#2155)
The type returned by `String::from_utf8(raw)`, is `Result<_>` and needs
to be mapped to match the type of the return type of `next`. You get
this error otherwise:

```
    Compiling playground v0.0.1 (/playground)
warning: unused import: `ErrorKind`
 --> src/main.rs:1:21
  |
1 | use std::io::{self, ErrorKind};
  |                     ^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error[E0308]: mismatched types
   --> src/main.rs:29:17
    |
29  |         Ok(Some(s))
    |            ---- ^ expected `String`, found `Result<String, FromUtf8Error>`
    |            |
    |            arguments to this enum variant are incorrect
    |
    = note: expected struct `String`
                 found enum `Result<String, FromUtf8Error>`
help: the type constructed contains `Result<String, FromUtf8Error>` due to the type of the argument passed
   --> src/main.rs:29:12
    |
29  |         Ok(Some(s))
    |            ^^^^^-^
    |                 |
    |                 this argument influences the type of `Some`
note: tuple variant defined here
   --> /playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:579:5
    |
579 |     Some(#[stable(feature = "rust1", since = "1.0.0")] T),
    |     ^^^^
help: use the `?` operator to extract the `Result<String, FromUtf8Error>` value, propagating a `Result::Err` value to the caller
    |
29  |         Ok(Some(s?))
    |                  +

For more information about this error, try `rustc --explain E0308`.
warning: `playground` (bin "playground") generated 1 warning
error: could not compile `playground` (bin "playground") due to 1 previous error; 1 warning emitted
```
2024-06-24 09:57:00 -04:00
snazzybytes
32b5a19684
Update broken "channels" link (#2146)
Stumbled upon another broken link. Courtesy fix 🫡
2024-06-17 09:19:00 -04:00
GeorgNeis
1723baee47
Update generic-traits.md (#2142)
Fix a typo.
2024-06-13 12:18:45 -04:00
Andrew Walbran
26e1d77b3e
Add note about !Sync (#2138)
This is key to the validity of how Cell and RefCell allow safe interior
mutability.
2024-06-10 15:35:13 +01:00
Martin Geisler
c45b291851
Clarify what "undefined behavior" means in arithmetic.md (#2139)
Undefined behavior does not just mean that the behavior can be different
on different platforms. It is much worse than that: the runtime behavior
can be completely nonsensical since the whole program has undefined
behavior.

The compiler will optimizer as if there is no undefined behavior and
will can lead to strange situations as the compiler concludes that
things like `a > a + 1000` can never be reached if `a` is a signed 8-bit
value (since reaching it would trigger undefined behavior).
2024-06-10 10:18:25 -04:00
Martin Geisler
4c61cafda8
Fix missing full stop in benefits.md (#2140) 2024-06-10 10:16:10 -04:00
dependabot[bot]
742df51d23
cargo: bump cc from 1.0.98 to 1.0.99 in /src/bare-metal/aps/examples in the patch group (#2136)
Bumps the patch group in /src/bare-metal/aps/examples with 1 update:
[cc](https://github.com/rust-lang/cc-rs).

Updates `cc` from 1.0.98 to 1.0.99

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 09:38:59 +01:00
dependabot[bot]
f71935e0cc
cargo: bump cc from 1.0.98 to 1.0.99 in /src/exercises/bare-metal/rtc in the patch group (#2135)
Bumps the patch group in /src/exercises/bare-metal/rtc with 1 update:
[cc](https://github.com/rust-lang/cc-rs).

Updates `cc` from 1.0.98 to 1.0.99

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 09:38:36 +01:00
Dustin J. Mitchell
412eac6689
Clarify the suggested steps in the pin page (#2130)
The speaker notes suggest an evolution of the code to support a periodic
timer, but the last step was under-specified.

(As mentioned by @fw-immunant and referenced in #1536)
2024-06-07 16:39:14 -04:00
Nicole L
b69b68f5e2
Remove error handling from protobuf exercise (#2109) 2024-06-07 09:13:11 -07:00
Nicole L
511e5f0dbf
Add slide about Result to error handling section (#2123) 2024-06-07 09:12:51 -07:00
Nicole L
fbeda7216b
Adjust timing of standard library slides (#2125) 2024-06-07 09:11:57 -07:00
Dustin J. Mitchell
7c48cacf82
Fix dead link in glossary (#2114)
Fixes #2110. I think `references/strings.html` is a better choice as it
covers both String and &str.
2024-06-05 10:21:32 -04:00
Andrew Walbran
5f72514f04
Fix closing details tag (#2116) 2024-06-03 10:54:40 -04:00
Andrew Walbran
5f4ff0ab09
List expressions which are actually explained on this page (#2115)
`match` expressions were explained on an earlier page.
2024-06-03 10:54:16 -04:00
dependabot[bot]
d09041fb91
cargo: bump tokio from 1.37.0 to 1.38.0 in the minor group (#2113)
Bumps the minor group with 1 update:
[tokio](https://github.com/tokio-rs/tokio).

Updates `tokio` from 1.37.0 to 1.38.0

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 10:43:11 +01:00
Nicole L
59bf3bdcfb
Add a slide introducing dyn Trait in Generics (#2108)
I've been thinking it'd be simpler to introduce `dyn Trait` via `&dyn
Trait` rather than waiting for the smart pointers section and `Box<dyn
Trait>`. This PR adds a slide to the Generics section that introduces
`&dyn Trait` and compares it to `&impl Trait`, juxtaposing
monomorphization and static dispatch against type-erasure and dynamic
dispatch. I've then updated the existing trait object slide to call back
to the earlier introduction, and call out that using `Box<dyn Trait>`
gives you an owned trait object rather than a borrowed one.
2024-05-31 09:59:36 -04:00
Nicole L
06264e8cc7
Add a note that shared references are Copy (#2107)
Add a note to the `Copy` slide noting that shared references are `Copy`.
A student asked about this today, and it's something I want to remember
to mention in future classes.
2024-05-30 10:19:33 -04:00
Dustin J. Mitchell
13d69007d4
Clarify speaker note in control-flow-basics (#2102)
Fixes #2096.
2024-05-29 13:08:06 -04:00
Carlos Pereira Atencio
663018751d
Fix bare metal microcontroller part number. (#2065)
Small update, the microb:bit V2 has the nRF52833, the nRF51822 was from
V1.
2024-05-28 11:52:49 +00:00