1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-16 14:17:34 +02:00
Commit Graph

2019 Commits

Author SHA1 Message Date
a1e7f728c4 Lower dependabot frequency to monthly (#2329)
We are not super dependent on using the latest patch releases of every
crate, so a monthly update frequency should be more than enough.

Note that we still get PRs if/when there is a [security
update](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#scheduleinterval).
2024-09-02 17:21:02 +02:00
6110074d13 fa: android fa 3/4 translated (#2345)
fa: android fa 3/4 translated

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-09-02 14:05:38 +03:30
8e976ca734 cargo: bump the patch group with 3 updates (#2344)
Bumps the patch group with 3 updates:
[fantoccini](https://github.com/jonhoo/fantoccini),
[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-09-02 10:07:29 +01:00
5615b996aa cargo: bump tokio from 1.39.3 to 1.40.0 in the minor group (#2343)
Bumps the minor group with 1 update:
[tokio](https://github.com/tokio-rs/tokio).

Updates `tokio` from 1.39.3 to 1.40.0

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 10:07:21 +01:00
5f51537c3e build(deps): bump crate-ci/typos from 1.24.1 to 1.24.3 (#2342)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.24.1 to
1.24.3.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 10:06:33 +01:00
44bd72fa34 cargo: bump cc from 1.1.14 to 1.1.15 in /src/exercises/bare-metal/rtc in the patch group (#2341)
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.1.14 to 1.1.15

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 10:06:07 +01:00
3ff1061c5f cargo: bump cc from 1.1.14 to 1.1.15 in /src/bare-metal/aps/examples in the patch group (#2340)
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.1.14 to 1.1.15
<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.1.15</h2>
<h3>Other</h3>
<ul>
<li>Add -mfloat-abi=hard as a default argument when using any
arm/thumb-none-eabihf target (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1194">#1194</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.1.14...cc-v1.1.15">1.1.15</a>
- 2024-08-26</h2>
<h3>Other</h3>
<ul>
<li>Add -mfloat-abi=hard as a default argument when using any
arm/thumb-none-eabihf target (<a
href="https://redirect.github.com/rust-lang/cc-rs/pull/1194">#1194</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="41535f6dc9"><code>41535f6</code></a>
chore: release (<a
href="https://redirect.github.com/rust-lang/cc-rs/issues/1195">#1195</a>)</li>
<li><a
href="ad5d37b7ea"><code>ad5d37b</code></a>
Add -mfloat-abi=hard as a default argument when using any
arm/thumb-none-eabi...</li>
<li>See full diff in <a
href="https://github.com/rust-lang/cc-rs/compare/cc-v1.1.14...cc-v1.1.15">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cc&package-manager=cargo&previous-version=1.1.14&new-version=1.1.15)](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-09-02 10:05:28 +01:00
fb1e41b645 fa: android part 2/4 translated (#2338)
fa: android part 2/4 translated

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-09-01 01:41:45 +03:30
b1540d9582 fa: Android part 1/4 (#2337)
fa: Android part 1/4

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-08-31 00:37:41 +03:30
3269cb9e4c fa: bare-metal part 3/3 (#2330)
fa: bare-metal part 3/3

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-08-30 00:08:56 +03:30
213d02aedc fa: src/bare-metal par 2/3 (#2328)
fa: src/bare-metal par 2/3

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-08-29 00:47:57 +03:30
6c0204fd50 Added tests and implementation for I32(float) for Exercise: Protobuf Parsing (#2302)
Update for Exercise: Protobuf Parsing

* Include tests in the solution
* Remove implementatinon of wire type I32, but leave it as a "more-to-explore" extension
2024-08-28 13:22:59 -04:00
7af9690e3e zh-CN: glossary translation (#1992)
The po file has been refreshed. Translation range: L22164-L22764.

https://github.com/google/comprehensive-rust/issues/324

Translations of terms refer to the Chinese version of the TRPL and
https://github.com/rust-lang-cn/english-chinese-glossary-of-rust/blob/master/rust-glossary.md

Note: Since italics are not used in Chinese to indicate quotation or
emphasisin Chinese, English italics have been translated into Chinese
bold, and the original English text of terms is marked in full-width
parentheses.
2024-08-28 08:58:01 +02:00
92c890f287 Update lifetimes/exercise.rs (#2326)
Rename `as_string()` to `as_str()`. We are returning a `&str` not
`String`. The latter name is also more idomatic and widely used.
2024-08-28 06:52:45 +00:00
be3a92a12a fa: bare-metal part 1/3 (#2324)
fa: bare-metal part 1/3

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-08-28 00:27:32 +03:30
1d88d7a6c0 es: Course length mistake (#2043)
Remove mention of course length

---------

Co-authored-by: Martin Geisler <mgeisler@google.com>
2024-08-27 18:12:28 +02:00
d45ec368ef Update approaches.md (#2317)
I might be missing something, but RAII is generally associated with
programming languages with manual memory management (prominently with
C++, where it originated), so I think it is not very appropriate to have
it mentioned here.
2024-08-27 15:57:52 +00:00
cfdd9c37a9 fa: credits and other-resources (#2323)
fa: credits and other-resources

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-08-26 23:45:46 +03:30
dc7ba17421 cargo: bump the patch group with 4 updates (#2316)
Bumps the patch group with 4 updates:
[serde](https://github.com/serde-rs/serde),
[serde_json](https://github.com/serde-rs/json),
[fantoccini](https://github.com/jonhoo/fantoccini) and
[reqwest](https://github.com/seanmonstar/reqwest).
2024-08-26 09:43:35 -04:00
a360ee6820 build(deps): bump crate-ci/typos from 1.23.6 to 1.24.1 (#2315)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.23.6 to
1.24.1.
2024-08-26 09:41:33 -04:00
ba5090dc82 cargo: bump cc from 1.1.13 to 1.1.14 in /src/bare-metal/aps/examples in the patch group (#2314)
Bumps the patch group in /src/bare-metal/aps/examples with 1 update:
[cc](https://github.com/rust-lang/cc-rs).
2024-08-26 09:41:05 -04:00
815f718a0b cargo: bump cc from 1.1.13 to 1.1.14 in /src/exercises/bare-metal/rtc in the patch group (#2318)
Bumps the patch group in /src/exercises/bare-metal/rtc with 1 update:
[cc](https://github.com/rust-lang/cc-rs).
2024-08-26 09:34:26 -04:00
03bde207e8 fa :glossary translated (#2311)
fa :glossary translated

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-08-26 00:23:53 +03:30
f4692f12bf fa: concurrency/async-exercises translated to Farsi (#2308)
fa: concurrency/async-exercises translated to Farsi

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-08-25 02:22:00 +03:30
dec218adcd fa: concurrency/async/runtimes translate to Farsi (#2306)
fa: concurrency/async/runtimes translate to Farsi

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-08-24 00:37:42 +03:30
26979c9542 Move const before static (#2305)
Motivation:
* const usecases are likely more familiar than static usecases
* currently the static slide refers `const`, before it's introduced

Background: static and const were previously on the same slide, with
const being introduced first (
https://github.com/google/comprehensive-rust/pull/1881 ) but when they
were split, static was moved first.
2024-08-23 18:48:57 +00:00
d706758b07 concurrency/sync-exercises translated to Fa (#2304)
concurrency/sync-exercises translated to Farsi

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-08-23 01:04:04 +03:30
d8ab3e0009 concurrency/send-sync translate to Farsi (#2301)
concurrency/send-sync to Farsi

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-08-22 05:23:44 +03:30
73612991be vi: control-flow-basics/excercise.md translations (#2112)
I think the msg in the file maybe out of sync with
https://google.github.io/comprehensive-rust/control-flow-basics/exercise.html.

Should I continue to refer to the .po file as a source-of-truth, or
should I update the English message, as well as the Vietnamese
translation in this file?

Or should we re-sync the vi.po file first?
2024-08-21 08:01:36 -04:00
3edec36fab add Farsi to Incomplete Translations (#2269) 2024-08-21 07:58:09 +00:00
ea1209336b vi: Day 1 Morning - Types and Values translation (#2020)
Here is the translation of *Day 1 Morning: Type and Values* translation.

It seems like there is no corresponding definition of *hygienic macros*
in Vietnamese, so I think keeping its English word is fine.

---------

Co-authored-by: Martin Geisler <mgeisler@google.com>
2024-08-21 07:46:24 +00:00
0b4e2a8813 zh-CN: translation for "17.4 Casting" (#2294) 2024-08-21 07:28:57 +00:00
355d65b3ba Add mdbook-slide-evaluator (#2258)
I created a first implementation for the mdbook-slide-evaluator I
described in #2234.

One has to run a WebDriver compatible browser (e.g. selenium-chromium)
so the slides can be rendered. The browser can access the file either
via a file:// or http:// uri.

The tool grabs the configurable element from that page and evaluates the
size of this element. Output can be stored in a csv file or at stdout
and looks like this at the moment:
```
$ mdbook-slide-evaluator book/html/android/aidl
book/html/android/aidl/birthday-service.html: 750x134
book/html/android/aidl/example-service/changing-definition.html: 750x555
book/html/android/aidl/example-service/changing-implementation.html: 750x786
book/html/android/aidl/example-service/client.html: 750x1096
book/html/android/aidl/example-service/deploy.html: 750x635
book/html/android/aidl/example-service/interface.html: 750x570
book/html/android/aidl/example-service/server.html: 750x837
book/html/android/aidl/example-service/service-bindings.html: 750x483
book/html/android/aidl/example-service/service.html: 750x711
book/html/android/aidl/types/arrays.html: 750x291
book/html/android/aidl/types/file-descriptor.html: 750x1114
book/html/android/aidl/types/objects.html: 750x1258
book/html/android/aidl/types/parcelables.html: 750x637
book/html/android/aidl/types/primitives.html: 750x366
book/html/android/aidl/types.html: 750x197
```

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2024-08-21 07:18:07 +00:00
958bfe58c5 Update shared.md (#2292) 2024-08-21 06:34:08 +00:00
590a88fc3d update break-continue.md (#2287)
Move the speak note about "loop" into the page which we actually talk
about "loop". Also update the wording to make it more accurate.

---------

Co-authored-by: Jason Lin <lxj@google.com>
2024-08-21 06:33:50 +00:00
e282cb2002 concurrency threads fa (#2297)
concurrency threads fa in the middle way for translation.

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-08-21 00:47:03 +03:30
3ecf12123b cargo: bump the minor group with 2 updates (#2290)
Bumps the minor group with 2 updates:
[pulldown-cmark](https://github.com/raphlinus/pulldown-cmark) and
[googletest](https://github.com/google/googletest-rust).
2024-08-20 16:46:56 +01:00
aa0201ccfd interior-mutability.md: swap Cell/RefCell order and improve explanation (#2278)
Fixes #2249.
2024-08-20 11:26:23 -04:00
3fae0fd09f concurrency fa (#2296)
add concurrency fa to day 1.

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-08-20 12:09:43 +03:30
4012e2a883 Update if.md (#2286)
The original phrasing may imply that you have to always terminated a
`if` expression with `;`. But the real reason that we have to do that is
because we are using it in a `let` statement here, and `let` statement
has to be terminated by `;`

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2024-08-20 08:15:39 +00:00
127202d591 Update trait-bounds.md (#2295)
We are going to talk about `impl Trait` in the very next slide. Let's
don't duplicate it here and complicate the flow?
2024-08-20 08:08:32 +00:00
56ae649097 cargo: bump the patch group with 6 updates (#2291)
Bumps the patch group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap) | `4.5.15` | `4.5.16` |
| [serde](https://github.com/serde-rs/serde) | `1.0.206` | `1.0.208` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.124` | `1.0.125`
|
| [tokio](https://github.com/tokio-rs/tokio) | `1.39.2` | `1.39.3` |
| [cxx](https://github.com/dtolnay/cxx) | `1.0.124` | `1.0.126` |
| [cxx-build](https://github.com/dtolnay/cxx) | `1.0.124` | `1.0.126` |

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-19 12:14:42 +01:00
64bf5534f7 cargo: bump cc from 1.1.10 to 1.1.13 in /src/bare-metal/aps/examples in the patch group (#2289)
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.1.10 to 1.1.13

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-19 12:12:43 +01:00
82c97a091a cargo: bump cc from 1.1.10 to 1.1.13 in /src/exercises/bare-metal/rtc in the patch group (#2288)
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.1.10 to 1.1.13

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-19 12:12:25 +01:00
4d9e99369f ja: Fix file path to avoid build error (#2285)
- This PR fixes a wrong filepath (`configure-*` → `configuring-*`) in
the Japanese book.
- I've encountered an error below when I was building the book in
Japanese.

```bash
$ MDBOOK_BOOK__LANGUAGE=ja mdbook build -d book/ja
2024-08-15 21:52:56 [INFO] (mdbook::book): Book building has started
2024-08-15 21:52:57 [INFO] (mdbook::book): Running the exerciser backend
2024-08-15 21:52:57 [INFO] (mdbook::renderer): Invoking the "exerciser" renderer
2024-08-15 21:52:57 [INFO] (mdbook::book): Running the html backend
2024-08-15 21:52:58 [INFO] (mdbook::book): Running the linkcheck backend
2024-08-15 21:52:58 [INFO] (mdbook::renderer): Invoking the "linkcheck" renderer
error: File not found: ../configure-gnrt-config-toml.md
  ┌─ chromium/adding-third-party-crates/resolving-problems/build-scripts-which-generate-code.md:5:23
  │
5 │ もしファイルが作成されるようになっていたら、[`gnrt_config.toml`](../configure-gnrt-config-toml.md) を変更して、クレートに `build-script-outputs` を追加します。これが推移的依存関係(Chromium コードが直接依存すべきでない依存関係)の場合は、`allow-first-party-usage=false` も追加します。このファイルには、すでにいくつかの例が含まれています。
  │                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File not found: ../configure-gnrt-config-toml.md

Error: One or more incorrect links
2024-08-15 21:52:58 [ERROR] (mdbook::renderer): Renderer exited with non-zero return code.
2024-08-15 21:52:58 [ERROR] (mdbook::utils): Error: Rendering failed
2024-08-15 21:52:58 [ERROR] (mdbook::utils):    Caused By: The "linkcheck" renderer failed
```
2024-08-15 22:42:41 +09:00
dfd08ebf93 concurrency: avoid 1.. loops (#2280)
Fixes #2060. Note that this does not change the "blocking executor"
example because on that slide it is worthwhile to sleep for 1 * 10ms on
the first iteration and so on. But we shouldn't use one-indexed
inclusive loops when the only significant feature of the loop is its
iteration count.
2024-08-13 14:38:22 +00:00
e9fce0417e box.md: clarify that box provides needed indirection (#2283)
The last to-do for #64.
2024-08-13 14:29:11 +00:00
3b349d830c from-and-into.md: mention losslessness and infallibility (#2281)
Fixes #2069.
2024-08-13 14:28:22 +00:00
991bd8ceb7 threads: do not refer to "daemon" threads (#2282)
This is the last remaining fix left from #63.
2024-08-13 14:28:08 +00:00
f6a3c07ea3 operators.md: mention Not trait's un-C-like behavior (#2279)
Fixes #2072.
2024-08-13 14:27:49 +00:00