1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-01-02 06:32:19 +02:00
Commit Graph

2048 Commits

Author SHA1 Message Date
xiaohu-zhang
db0b161424
fix async Philosopher execise livelock error (#2372) 2024-09-20 12:13:16 +00:00
Martin Geisler
7a6abee0da
Remove part about Error not being no_std (#2369)
This reverts #1005 now that Rust 1.81 has stabilized the `Error` trait.
2024-09-18 03:38:19 +02:00
Nicole L
d2bc223a06
Misc. Android Improvements (#2325)
- Add missing package declaration on the AIDL interface slide.
- Make the parcelable example more self-contained. The existing code was
referencing variables that weren't declared in the example code.
- Add a speaker note to the logging slide about explaining that the
logger implementation is only needed in binaries, and that just the log
facade is needed in libraries.
2024-09-17 09:09:07 -07:00
Danny Khosravi
9c16b36b5e
fa: Scattered reforms part 3 (#2366)
fa: Scattered reforms part 3

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-09-16 07:24:59 +03:30
Danny Khosravi
0d601a3613
fa: Scattered reforms part 2 (#2365)
fa: Scattered reforms part 2

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-09-14 00:22:39 +03:30
Danny Khosravi
626212ab26
fa: reform: generics + borrowing + lifetimes (#2364)
fa: reform -> generics + borrowing + lifetimes

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-09-13 10:52:02 +03:30
Willow Carretero Chavez
c5f9e5337b
es: Spanish translation refresh (#2232)
Fixes #2120.
2024-09-12 15:33:38 +00:00
xrdelectro
3637c44a5d
Fix typo in box.md (#2362) 2024-09-12 14:53:54 +00:00
Danny Khosravi
5aa08d489f
fa: refreshed Translation For Farsi (#2363)
fa: refreshed Translation For Farsi 
I follow [Refreshing an Existing
Translation](https://github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md#refreshing-an-existing-translation)

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-09-12 10:33:11 +03:30
Martin Geisler
1f1a7708af
Update build-rules.md (#2355)
Fixes #1837.
2024-09-11 10:37:24 -07:00
Danny Khosravi
066549f7ff
fa: chromium part 5/5 complete (#2361)
fa: chromium part 5/5 complete

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
2024-09-11 00:07:56 +02:00
Martin Geisler
53845ffcaf
Avoid [T] in slices title (#2358)
There is a problem in how we generate the segment tables: we use the
`Chapter::name` field as given to us from `mdbook`. The problem is that
this string is stripped from formatting:

    Slices: `&[T]`

becomes

    Slices: &[T]

The string now looks like a reference link, but of course there is no
definition of the `T` link:

    warning: Potential incomplete link
      ┌─ references.md:9:12
      │
    9 │ | Slices: &[T] | 10 minutes |
      │            ^^^ Did you forget to define a URL for `T`?
      │
= hint: declare the link's URL. For example: `[T]: http://example.com/`

For now, I will simply take out the reference. This also makes the
titles more uniform in this segment: we don’t add `&T` or `&mut T` to
the other slide titles.
2024-09-10 22:11:09 +02:00
Danny Khosravi
1afd366024
chromium part 4/5 (#2360)
chromium part 4/5

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-09-09 23:25:17 +03:30
Danny Khosravi
d0a93291b6
fa :chromium part 3/5 (#2359)
fa :chromium part 3/5

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-09-09 01:24:55 +03:30
Alix
af79cf46e8
fa: day 3 (#2354) 2024-09-08 22:39:40 +03:30
uint256_t
7f5677deff
ja: Refresh translation (#2356)
As suggested in
https://github.com/google/comprehensive-rust/pull/2285#issuecomment-2317045933,
I've refreshed the Japanese translation.
2024-09-08 20:25:12 +02:00
Frances Wingerter
b3adc3b09a
Clarify Fn traits slide (#2333)
Improve naming and always capture something in our closures; explain
other details/variations in speaker notes.

Fixes #2251.
2024-09-08 15:49:54 +02:00
Danny Khosravi
432f7bc5dc
fa: chromium part 2/5 (#2357)
fa: chromium part 2/5

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-09-08 05:32:30 +03:30
Danny Khosravi
4ce047a1c1
fa: chromium part 1/5 (#2353)
fa: chromium part 1/5

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-09-06 17:13:22 +03:30
javad-jafari
5864ee90ff
fa: add src/user-defined-types/named-structs (#2351)
Co-authored-by: Danny Khosravi <danykhosravi@gmail.com>
2024-09-05 21:11:59 +00:00
javad-jafari
45dd9cd845
fa: review tuples-and-arrays/exercise (#2350)
Co-authored-by: Danny Khosravi <danykhosravi@gmail.com>
2024-09-05 19:21:27 +00:00
javad-jafari
ce7e6c6f9b
fa: review til tuples-and-arrays/destructuring (#2349)
Co-authored-by: Danny Khosravi <danykhosravi@gmail.com>
2024-09-05 22:09:39 +03:30
Danny Khosravi
e98ea95f98
fa: android complete (#2348)
fa: android complete

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-09-05 01:29:55 +03:30
Lalit Shankar Chowdhury
45f869902b
Clarify and fix grammatical errors (#2347)
Fix minor grammatical errors in Day 1: Morning.

Speaker notes 6.5: "the `-> ()` return type" changed to "the return
type".

The compiler will infer the unit type for any type omitted.
2024-09-04 18:54:14 +00:00
Danny Khosravi
3fd07926e5
fa: android near to complete (#2346)
fa: android near to complete

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-09-04 00:12:12 +03:30
Frances Wingerter
c223257016
Clarify how MutexGuard is 'thread-safe' (avoiding the vague term) (#2336)
Fixes the last outstanding point of #1640.
2024-09-03 09:43:00 -04:00
Frances Wingerter
345e782bdd
testing: fix cfg(never) warning (#2334)
See <https://doc.rust-lang.org/nightly/rustc/check-cfg.html>.
2024-09-03 09:42:42 -04:00
vegetabledogdog
cab287849b
fix an error in hashmap.md (#2339)
There is a small syntax error.
2024-09-03 09:42:12 -04:00
Võ Hoàng Long
30ae1f4f0d
Add "associated type" to glossary (#2331)
# Why
For example, while reading [this
line](3269cb9e4c/src/std-traits/operators.md (L39)),
a user may want to quickly look up what an "associated type" is.

This also helps with translations. In Vietnamese, there isn't a good
translation for this term, so keeping the original term and providing a
description of it in the glossary would be very helpful.
2024-09-02 15:32:48 +00:00
Martin Geisler
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
Danny Khosravi
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
dependabot[bot]
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
dependabot[bot]
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
dependabot[bot]
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
dependabot[bot]
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
dependabot[bot]
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
Danny Khosravi
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
Danny Khosravi
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
Danny Khosravi
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
Danny Khosravi
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
Ivan Sakharovskii
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
mobyw
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
Jason Lin
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
Danny Khosravi
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
Salva Munoz
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
Jason Lin
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
Danny Khosravi
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
dependabot[bot]
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
dependabot[bot]
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
dependabot[bot]
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