1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-09 09:11:50 +02:00
Commit Graph

1869 Commits

Author SHA1 Message Date
dependabot[bot]
043645c90a
cargo: bump the patch group with 3 updates (#2150)
Bumps the patch group with 3 updates:
[clap](https://github.com/clap-rs/clap),
[cxx](https://github.com/dtolnay/cxx) and
[cxx-build](https://github.com/dtolnay/cxx).
2024-06-17 09:36:18 -04:00
snazzybytes
32b5a19684
Update broken "channels" link (#2146)
Stumbled upon another broken link. Courtesy fix 🫡
2024-06-17 09:19:00 -04:00
dependabot[bot]
a89a4d70ca
build(deps): bump crate-ci/typos from 1.22.3 to 1.22.7 (#2149)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.22.3 to
1.22.7.
2024-06-17 09:10:02 -04:00
Andriy Redko
4ac1cdca76
uk: refresh translations (#2148)
uk: refresh translations

```
MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot", "granularity": 0}}'   mdbook build -d po
msgmerge --update po/uk.po po/messages.pot
```

Signed-off-by: Andriy Redko <drreta@gmail.com>
2024-06-17 10:55:21 +01:00
Henri F
e3f153a6a0
Add VSCode config directory to .gitignore (#2147) 2024-06-16 21:04:06 +01:00
Henri F
eecb4f0276
Add Google's Project IDX files to .gitignore (#2145)
Add [Project IDX](https://idx.dev/) files to `.gitignore`
2024-06-14 21:33:25 -07:00
GeorgNeis
1723baee47
Update generic-traits.md (#2142)
Fix a typo.
2024-06-13 12:18:45 -04:00
Rush
d2f8fc4ac5
Fix: Click anywhere on the language switch menu to switch the language (#2144)
close: https://github.com/google/comprehensive-rust/issues/2132
2024-06-13 12:17:26 -04:00
Mehrad
e70de3eb27
fa: refresh translation for Jun 2024 (#2128)
Updating `fa.po` translations based on the latest changes. If we merge
this before the #2038, it's easier to review that merge request.

Related to #671.

Co-authored-by: Mehrad Rousta <mehrad@protonmail.com>
2024-06-13 12:13:16 +03:30
Võ Hoàng Long
f531554086
vi: Translate the std library String type (#2052) 2024-06-10 19:38:35 -07:00
Huy Vuong
b57319bb20
vi: control-flow-basics/macros.md translations (#2111) 2024-06-10 22:11:43 -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
Andriy Redko
6c5287c447
uk: Glossary and Credits (#2133)
Glossary and Credits

Signed-off-by: Andriy Redko <drreta@gmail.com>
2024-06-10 10:56:30 +01:00
dependabot[bot]
6b17ce7125
cargo: bump the patch group with 4 updates (#2137)
Bumps the patch group with 4 updates:
[clap](https://github.com/clap-rs/clap),
[regex](https://github.com/rust-lang/regex),
[cxx](https://github.com/dtolnay/cxx) and
[cxx-build](https://github.com/dtolnay/cxx).

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 09:39:27 +01: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
dependabot[bot]
53daee6993
build(deps): bump crate-ci/typos from 1.21.0 to 1.22.3 (#2134)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.21.0 to
1.22.3.

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:06 +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
Andriy Redko
a4d80d3ba0
uk: Concurrency (afternoon) (#2117)
uk: Concurrency (afternoon)

Signed-off-by: Andriy Redko <drreta@gmail.com>
2024-06-04 11:10:16 +01: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
Henri F
7d889d3248
ja: Merge CR v.2 Japanese translation back into main (#2103)
This PR merges the Japanese (ja) v.2 translation back to main.
This requires just a syntactical review, as the partial PRs into this
branch were reviewed already.

You can skim this PR with the [GitHub CLI](https://cli.github.com/):

gh pr diff 2103 | bat -l patch

#1463 #652

---------

Co-authored-by: Kanta Yamaoka (山岡幹太) <49053649+kantasv@users.noreply.github.com>
Co-authored-by: Hidenori Kobayashi <hidenorik@chromium.org>
2024-05-31 10:58:06 -07: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
8e668cdadd
Revert "Saving the playground state in local storage (#1942)" (#2106)
This reverts commit e2cad7da8d.

Fixes #2105, #2104.
2024-05-30 02:15:07 +00: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
Andriy Redko
634258ccf0
uk: Concurrency (morning) (#2097)
uk: Concurrency (morning)

Signed-off-by: Andriy Redko <drreta@gmail.com>
2024-05-28 11:27:45 +01:00
AdrienBaudemont
a8fc72ef2f
fr: completing and reviewing the translation of section 2. (#2032)
fr: completing and reviewing the translation of section 2.
2024-05-28 11:59:52 +02:00
Võ Hoàng Long
3d8e71f2fc
vi: Refresh Vietnamese translation (#2061)
The English contents has changed, leading to untranslated session
outline and schedule because the msgid no longer match the original
contents. Additionally, incorrect file names are listed in the comment.
This PR follow the steps outlined in [Refreshing an Existing
Translation](https://github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md#refreshing-an-existing-translation)
to refresh the Vietnamese translation file. After the update, some
translated session outlines were no longer appropriated, so this PR also
updates all of them
2024-05-28 11:54:57 +02:00
Manichand Kondapaka
e2cad7da8d
Saving the playground state in local storage (#1942)
#1476 issue. Updated the function call(`getCodeFromPlayground`) in
`save-playground.js` file from `pagehide` event to change event in ace
editor.

---------

Co-authored-by: Martin Geisler <mgeisler@google.com>
2024-05-28 09:51:41 +00:00
dependabot[bot]
83b31e19af
cargo: bump the patch group with 2 updates (#2099)
Bumps the patch group with 2 updates:
[serde](https://github.com/serde-rs/serde) and
[tokio-websockets](https://github.com/Gelbpunkt/tokio-websockets).

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 10:26:34 +01:00
dependabot[bot]
a3f31e795d
cargo: bump nrf52833-hal from 0.17.1 to 0.18.0 in /src/bare-metal/microcontrollers/examples in the minor group (#2098)
Bumps the minor group in /src/bare-metal/microcontrollers/examples with
1 update: [nrf52833-hal](https://github.com/nrf-rs/nrf-hal).

Updates `nrf52833-hal` from 0.17.1 to 0.18.0
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/nrf-rs/nrf-hal/blob/master/CHANGELOG.md">nrf52833-hal's
changelog</a>.</em></p>
<blockquote>
<h2>[0.18.0]</h2>
<h3>Breaking changes</h3>
<ul>
<li>Updated <code>nrf-usbd</code> to 0.3.0. (<a
href="https://redirect.github.com/nrf-rs/nrf-hal/issues/460">#460</a>)</li>
</ul>
<h3>New features</h3>
<ul>
<li>Added support for nRF52805 (<a
href="https://redirect.github.com/nrf-rs/nrf-hal/issues/422">#422</a>).</li>
<li>Added implementation of RTIC <code>Monotonic</code> for RTC and
TIMER, behind new <code>monotonic</code> feature (<a
href="https://redirect.github.com/nrf-rs/nrf-hal/issues/427">#427</a>).</li>
</ul>
<p><a
href="https://redirect.github.com/nrf-rs/nrf-hal/issues/422">#422</a>:
<a
href="https://redirect.github.com/nrf-rs/nrf-hal/pull/422">nrf-rs/nrf-hal#422</a>
<a
href="https://redirect.github.com/nrf-rs/nrf-hal/issues/427">#427</a>:
<a
href="https://redirect.github.com/nrf-rs/nrf-hal/pull/427">nrf-rs/nrf-hal#427</a>
<a
href="https://redirect.github.com/nrf-rs/nrf-hal/issues/460">#460</a>:
<a
href="https://redirect.github.com/nrf-rs/nrf-hal/pull/440">nrf-rs/nrf-hal#440</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="997d0bd27a"><code>997d0bd</code></a>
Merge pull request <a
href="https://redirect.github.com/nrf-rs/nrf-hal/issues/476">#476</a>
from nrf-rs/release</li>
<li><a
href="bb7aef2593"><code>bb7aef2</code></a>
Prepare for 0.18.0 release.</li>
<li><a
href="090ce0ec9a"><code>090ce0e</code></a>
Merge pull request <a
href="https://redirect.github.com/nrf-rs/nrf-hal/issues/427">#427</a>
from Kyrne/master</li>
<li><a
href="4c00992a68"><code>4c00992</code></a>
Use consistent feature name.</li>
<li><a
href="eb8b34a73c"><code>eb8b34a</code></a>
Merge pull request <a
href="https://redirect.github.com/nrf-rs/nrf-hal/issues/477">#477</a>
from nrf-rs/buildfix</li>
<li><a
href="ee11451354"><code>ee11451</code></a>
rename user facing feature to rtic-monotonic</li>
<li><a
href="c8bf535d7b"><code>c8bf535</code></a>
Correct docs (<a
href="https://redirect.github.com/nrf-rs/nrf-hal/issues/18">#18</a>)</li>
<li><a
href="3c353da5f0"><code>3c353da</code></a>
Monotonic doesn't build on nrf51 or nrf52832 so remove the feature.</li>
<li><a
href="8eff0e5fc4"><code>8eff0e5</code></a>
Format doc comments and fix typos.</li>
<li><a
href="bb1bb77b30"><code>bb1bb77</code></a>
Fix feature conditions.</li>
<li>Additional commits viewable in <a
href="https://github.com/nrf-rs/nrf-hal/compare/v0.17.1...v0.18.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nrf52833-hal&package-manager=cargo&previous-version=0.17.1&new-version=0.18.0)](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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-28 10:26:02 +01:00
Darkhan Kubigenov
f337c0f70d
Upgrade dependencies in github actions (#2101) 2024-05-28 10:49:12 +02:00
Nicole L
6115a12554
Fix missing lifetime error in dangling reference example (#2093)
The example of returning a reference to a local variable doesn't compile
due to a missing lifetime specifier, which isn't what we're trying to
demonstrate with that example. I usually add the lifetime in manually in
order to demonstrate the compiler error, but it occurs to me that if we
make the argument a reference we can sneakily get the correct compiler
error without having to introduce the lifetime syntax.
2024-05-23 23:27:10 +00:00
Andrew Walbran
5ce6a9bd72
Downgrade cortex-m-rt to 0.7.3. (#2095)
0.7.4 was yanked.

Fixes #2094.
2024-05-23 15:14:05 -04:00
Alexandra Imbrisca
3d999663ac
Add @AlexandraImbrisca to CODEOWNERS (#2091)
Co-authored-by: Martin Geisler <martin@geisler.net>
2024-05-22 11:17:25 +02:00
Razvan Musaloiu-E
23c5f66758
Add razvanm CODEOWNERS for ro.po (#2090) 2024-05-22 11:15:40 +02:00
Henri F
6b1b024a47
Update CODEOWNERS with new vi.po reviewer (#2051)
Ignored unrelated failing tests.
2024-05-21 20:30:17 -07:00
Henri F
27a2b3c04a
zh-TW: Merge CR v2 translations for Concurrency (#2082)
This PR merges the Chinese Traditional (zh-TW) CR v.2 translation
(Concurrency) back to main.
This requires just a syntactical review, as the partial PRs into this
branch were reviewed already.

You can skim this PR with the [GitHub CLI](https://cli.github.com/):

```
gh pr diff 2082 | bat -l patch
```

---------

Co-authored-by: Victor Hsieh <victorhsieh@gmail.com>
Co-authored-by: Ming-Ying Chung <itsmings@gmail.com>
Co-authored-by: Jonathan Hao <johnathan79717@gmail.com>
2024-05-21 20:27:40 -07:00
RazvanSt
25d234b7f8
ro: Refresh Romanian translation (#1991)
Some more updates to the translation.

Signed-off-by: Mihai Preda <mpreda@google.com>
Signed-off-by: Razvan Stefanescu <rstefanescu@google.com>
2024-05-21 14:19:49 +02:00
Andriy Redko
225403ea27
uk: Bare-Metal Rust (afternoon) (#2089)
uk: Bare-Metal Rust (afternoon), finalize few leftovers
2024-05-21 10:23:24 +01:00
Andriy Redko
545fed4bdf
uk: Bare-Metal Rust (afternoon) (#2088)
uk: Bare-Metal Rust (afternoon)

Signed-off-by: Andriy Redko <drreta@gmail.com>
2024-05-20 20:40:52 +01:00