1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-03-24 15:29:28 +02:00

2247 Commits

Author SHA1 Message Date
Danny Ra
3d1339c546
fa: fix translations.md restore sentence paragraph. ()
fix: translations.md restore sentence paragraph.

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-10-19 22:03:57 +03:30
Martin Geisler
e5d73d915b
Format filenames consistently ()
The style used in the rest of the course is _italic_ filenames, so we
should be careful to not suddenly use **bold** names.

The style is of course up for debate, but we need to ensure
consistency first.
2024-10-18 12:29:31 +02:00
Martin Geisler
ab78a9e6b8
Links in channel pages () 2024-10-18 09:05:01 +02:00
Martin Geisler
ad7ef2e50a
Make scoped thread examples consistent ()
This is a followup to .
2024-10-18 09:04:44 +02:00
Martin Geisler
1a9941b39f
Put “Bye!” message on its own line ()
Before the message would be printed right next to the text echoed
back. We now make sure to print it after a blank line.
2024-10-18 09:04:19 +02:00
Martin Geisler
0f00434a0f
Simplify language on mutex page ()
The “iff” phrasing has confused people in the past.
2024-10-18 09:04:10 +02:00
Martin Geisler
fb17791c26
Remove misplaced extern "C" ()
I think something changed: I now get a compilation error with these
lines (and it works fine without).
2024-10-18 09:03:54 +02:00
Martin Geisler
466233d959
Fix inclusion of PhoneNumber in exercise ()
The anchor used the wrong name. This was not caught by our tests
because the code isn’t expected to compile, even when this is
included.
2024-10-18 09:03:48 +02:00
Martin Geisler
47c3d50542
Simplify language, add links, formatting fixes ()
- Avoid time-specific statements (“recently”, “today”, …).

- Move details such as “RPIT” to the speaker notes.

- More links to our slides as well as community documentation.

- Formatting fixes
2024-10-18 09:03:17 +02:00
Martin Geisler
5d292377a0
Remove outdated note about showing type of future ()
Modern Rust just says “note: calling an async function returns a
future” and hides the `Future` type.
2024-10-18 09:02:53 +02:00
Martin Geisler
0afca2f69b
Formatting in threads () 2024-10-18 09:02:45 +02:00
Younies Mahmoud
2552776288
ar: First Stage: Initial 5000 Lines Translated () 2024-10-17 15:53:31 +02:00
Martin Geisler
36a592df28
Mention https://std.rs/ and rustup doc ()
These are convenient short-cuts for going to the standard library
documentation.
2024-10-17 02:53:02 -04:00
Danny Ra
4096bf89ae
fa: update fuzzy and untranslated part 1 ()
fa: update fuzzy and untranslated part 1

---------

Co-authored-by: javad-jafari <javajafarifromsharak@gmail.com>
Co-authored-by: javad-jafari <65780584+javad-jafari@users.noreply.github.com>
2024-10-17 01:12:23 +03:30
Henri F.
f1423eaa72
Fix broken link on translations.md () 2024-10-16 14:50:13 -04:00
Martin Geisler
09a072b1ce
Point out new code in Luhn exercise solution ()
This makes it easier for the students to understand where the changes
and thus fixes are.
2024-10-16 11:35:27 +02:00
Martin Geisler
0c824ab740
Fix “incorrect” which should have been “unsafe” () 2024-10-16 11:34:53 +02:00
Martin Geisler
701589ffd5
Consistently end list items with a full stop ()
This is more consistent.
2024-10-16 11:34:22 +02:00
Martin Geisler
bd7b7eb121
Clean up duplicate heading () 2024-10-16 11:28:43 +02:00
Martin Geisler
4c78c3be6d
Simplify with local variable ()
This reduces the vertical space needed.
2024-10-16 11:28:30 +02:00
Martin Geisler
dcdf3915ec
Fix typo in expect message () 2024-10-16 11:28:25 +02:00
Martin Geisler
1c3e4648e4
Remove unnecessary null check in FFI exercise ()
We only assign `self.dir` once and we only assign it if the pointer is
non-null. We can therefore simplify the drop implementation a little.
2024-10-16 11:25:22 +02:00
Henri F.
28b5b559b3
fa: Adds Farsi to the language selector ()
Adds Farsi to the drop-down language selector and minor rearrangement on
Translation page
2024-10-15 22:17:55 -07:00
Dustin J. Mitchell
d9e3ad9e63
Reduce references to niche optimization ()
Niche optimization is currently mentioned in three places:
 - Enums (User-Defined Types, Day 1 Afternoon)
 - Option (Standard Library Types, Day 2 Afternoon)
 - Box (Smart Pointers, Day 3 Morning)

This is a tricky thing to get right, and it was just in the speaker
notes in each place.  will introduce a fuller explanation.

Fixes .
2024-10-15 11:19:37 -04:00
Martin Geisler
a699430741
Remove unused Concurrency exercises page ()
This was moved to the `concurrency/` directory.
2024-10-15 16:15:38 +02:00
Martin Geisler
a1b483a2f5
Call out that self receivers are covered later ()
We have not formally introduced ownership at this point, so the
exercise can be confusing for students.

Alternatively, we could consider removing the `finish` method since
it’s not essential for a first encounter with methods.
2024-10-15 16:15:12 +02:00
Martin Geisler
a387b2c755
Simplify iterator method chaining exercise ()
The exercise is about iterators, _not_ generic integer types. The
`where` syntax has also not been introduced before, further adding
confusion for the students.
2024-10-15 16:14:50 +02:00
Martin Geisler
61407e6079
Avoid uppercase “HINT” ()
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” () 2024-10-15 16:13:53 +02:00
Martin Geisler
cf7359fac8
Add links to std and docs.rs ()
- **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 ()
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 ()
Fix typo
2024-10-09 03:25:54 +00:00
Danny Ra
7a25c4ad84
fa: try to complete Farsi part 3 ()
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 ()
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 ()
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 ()
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 ()
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 ()
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 ()
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 ()
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 ()
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: 

Signed-off-by: Alx-Lai <alexabc722@gmail.com>
2024-09-30 15:15:50 +00:00
Andriy Redko
0fe2722f5c
uk: Refresh translations ()
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 ()
Until  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 ()
Fixes . 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. ()
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 ()
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 ()
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 () 2024-09-20 14:19:53 -07:00
Frances Wingerter
aeb643f380
error-handling: split thiserror into its own slide ()
`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 .
2024-09-20 20:56:22 +00:00
xiaohu-zhang
db0b161424
fix async Philosopher execise livelock error () 2024-09-20 12:13:16 +00:00