1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-11-21 13:25:53 +02:00
Commit Graph

2120 Commits

Author SHA1 Message Date
Martin Geisler
61407e6079
Avoid uppercase “HINT” (#2428)
We don’t have a convention of all-capital headings. However, we can
have do a similar convention with a block quotes (see README and
TRANSLATIONS).

Reviewed-by: Martin Geisler <mgeisler@google.com>
2024-10-15 16:14:25 +02:00
Martin Geisler
c01142e5d2
Fix casing of “Rust” (#2433) 2024-10-15 16:13:53 +02:00
Martin Geisler
cf7359fac8
Add links to std and docs.rs (#2403)
- **Link to relevant crate APIs**
- **Add missing std links**
2024-10-15 08:12:25 +02:00
Danny Ra
25a2fa6a09
fa: try to complete Farsi - part 4 (#2401)
fa: try to complete Farsi - part 4

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-10-14 00:00:04 +03:30
Yerkebulan Tulibergenov
252bb62521
Fix typo (#2399)
Fix typo
2024-10-09 03:25:54 +00:00
Danny Ra
7a25c4ad84
fa: try to complete Farsi part 3 (#2395)
fa: try to complete Farsi part 3

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-10-04 23:28:39 +03:30
Martin Geisler
0474168196
Remove outdated tip about handling division by zero (#2393)
The exercise text already asks you to handle this.
2024-10-02 00:31:49 +00:00
dependabot[bot]
0a9a01d991
cargo: bump the patch group with 8 updates (#2388)
Bumps the patch group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.86` | `1.0.89` |
| [clap](https://github.com/clap-rs/clap) | `4.5.16` | `4.5.18` |
| [serde](https://github.com/serde-rs/serde) | `1.0.209` | `1.0.210` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.127` | `1.0.128`
|
| [pulldown-cmark](https://github.com/raphlinus/pulldown-cmark) |
`0.12.0` | `0.12.1` |
| [tokio-util](https://github.com/tokio-rs/tokio) | `0.7.11` | `0.7.12`
|
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.63` |
`1.0.64` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.12.7` |
`0.12.8` |

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 14:14:54 +01:00
dependabot[bot]
6a013839f3
cargo: bump cc from 1.1.15 to 1.1.23 in /src/exercises/bare-metal/rtc in the patch group (#2391)
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.15 to 1.1.23

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 14:01:30 +01:00
dependabot[bot]
7422ee20e6
cargo: bump cc from 1.1.15 to 1.1.23 in /src/bare-metal/aps/examples in the patch group (#2390)
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.15 to 1.1.23

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 14:01:07 +01:00
dependabot[bot]
259220ba88
build(deps): bump crate-ci/typos from 1.24.3 to 1.24.6 (#2389)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.24.3 to
1.24.6.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 14:00:39 +01:00
dependabot[bot]
be9ed92365
cargo: bump the minor group with 4 updates (#2387)
Bumps the minor group with 4 updates:
[regex](https://github.com/rust-lang/regex),
[buddy_system_allocator](https://github.com/rcore-os/buddy_system_allocator),
[tempfile](https://github.com/Stebalien/tempfile) 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-10-01 14:00:01 +01:00
dependabot[bot]
c23c0c9312
cargo: bump buddy_system_allocator from 0.10.0 to 0.11.0 in /src/bare-metal/alloc-example in the minor group (#2386)
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.10.0 to 0.11.0

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 13:59:34 +01:00
Alex Lai
29dcb0c06f
Exercise: method and traits: change output (#2383)
In this exercise, the original StderrLogger output to stderr, which user
cannot see the original log but "No output" in frontend". Change
`eprintln!` to `println!` to make it see-able in the frontend. Also, due
to the change, rename the logger struct.

Close: #2382

Signed-off-by: Alx-Lai <alexabc722@gmail.com>
2024-09-30 15:15:50 +00:00
Andriy Redko
0fe2722f5c
uk: Refresh translations (#2375)
uk: Refresh translations

```
mdbook build
msgmerge --update po/uk.po book/xgettext/messages.pot
```

Signed-off-by: Andriy Redko <drreta@gmail.com>
2024-09-29 08:11:16 +02:00
Dustin J. Mitchell
e4d89f6344
Temporarily remove po formatting (#2381)
Until #2173 is resolved, this temporarily removes the inconsistent
formatting of .po files depending on msgcat versions.
2024-09-29 08:08:41 +02:00
Dustin J. Mitchell
9d2ea42fc4
Fix thiserror slide (#2380)
Fixes #2379. This has `compile_fail` because `thiserror` isn't available
from within `mdbook test`.
2024-09-27 12:39:53 +00:00
Andrew Walbran
2713ea3475
Use Clang rather than GCC for assembly. (#2377)
This avoids the hack for using aarch64-linux-gnu on Linux, and also
removes a dependency.

Also switched to using `cargo-objcopy`, as we require `cargo-binutils`
already and it makes the Makefiles simpler.
2024-09-24 10:19:29 +01:00
Danny Khosravi
f64edfc1f7
fa: Try to complete Farsi part2 (#2378)
fa: Try to complete Farsi part2

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-09-24 01:30:48 +03:30
Danny Khosravi
83b74de18b
fa: Try to complete Farsi Part1 (#2374)
fa: Try to complete Farsi Part1

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-09-21 22:11:21 +03:30
Nicole L
2f9babd098
Miscellaneous minor improvements (#2370) 2024-09-20 14:19:53 -07:00
Frances Wingerter
aeb643f380
error-handling: split thiserror into its own slide (#2332)
`thiserror` is best understood as a way to eliminate boilerplate on the
patterns we've already seen, and then we can show it in conjunction with
`anyhow` subsequently.

Fixes #2027.
2024-09-20 20:56:22 +00:00
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