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

882 Commits

Author SHA1 Message Date
Martin Geisler
5a22a5f026 Remove unused "Summary" heading ()
The first heading is not actually used, it just takes up space here and
in the PO files.
2023-11-20 16:53:13 +01:00
Martin Geisler
8b863c0446 Update Rust dependencies ()
This fixes a low-criticality vulnerability in `atty` (on Windows):

  https://github.com/advisories/GHSA-g98v-hv3f-hcfr

I only updated the dependencies here which didn’t require code changes.
2023-11-20 09:26:19 -05:00
Enes Aydın
34f0cfb770 Revert minimum wrong example ()
Reverted as a result of discussion in  

@mgeisler
2023-11-19 11:40:57 +01:00
Anurag Sisodiya
5ffcac5bfd Filled missing glossary terms with their explanations ()
Changes Made
This Pull Request addresses issue  and includes the following
changes:
Added Glossary Terms: Filled in missing glossary terms with their
respective explanations.

Context
The glossary is a crucial reference for understanding key terms in the
project. This PR enhances its completeness and readability by adding
missing terms and improving the overall formatting.

Related Issues

Fixes .
2023-11-15 09:23:51 +00:00
Nicole L
d6bb75ab7b Revert "Update other-resources.md" ()
Reverts , as the learning resource added
there is not fully free content.
2023-11-13 09:28:22 -08:00
Martin Geisler
b7832d7856 Update glossary.md ()
Expand a few random entries of the glossary. This is just to remind
people that the glossary exists and that we should work on making it
complete.

Part of .
2023-11-10 14:15:32 +00:00
Dustin J. Mitchell
42d69b7e5d Update link for sudo bug ()
Thanks to @LuisMorenoSerrano. Fixes .
2023-11-09 10:33:53 -08:00
spoloxs
67d53d29a6 Update Android.bp files ()
Remove the `prefer_rlib` flags from all `Android.bp` files.

Solves issue 
2023-11-08 16:56:29 -08:00
Vencyr Laurence Imbo Amores
039bc4f35c Update other-resources.md ()
Added Rust Primer and CodeCrafters.
2023-11-08 15:56:12 -08:00
Nicole L
ca61ca4f57 Add CXX tutorial ()
Add a number of slides that cover most of CXX's functionality and
demonstrate how it can be used.

Fixes .

---------

Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-11-06 16:34:29 -08:00
Martin Geisler
3c159d8af0 Add instructions for how to use build_all.sh () 2023-10-31 09:00:02 +01:00
justanotheranonymoususer
17f61463f5 Update converting-error-types.md () 2023-10-25 11:02:34 -04:00
Martin Geisler
e6e4d50eef Be more precise about printing in compound-types.md ()
Fixes .
2023-10-24 11:32:34 +02:00
justanotheranonymoususer
77c55ef10e Update hashmap.md ()
Remove extra space
2023-10-24 08:01:21 +02:00
Chayim Refael Friedman
3ba21370bb Simpler character counting ()
`str.chars().map(|_| 1).sum()` is just `str.chars().count()`.
2023-10-23 20:36:26 +00:00
Gourav
ecd2bc863e Updated about nc and telnet in task.md ()
Updated about `nc` and `telnet` with their documentation link provided
as well
Closes issue 
2023-10-23 18:10:26 +00:00
Henri F
88edcd02e7 Adds Chinese Traditional to the language drop-down ()
Graduates the Chinese Traditional translation to the language drop-down
selector.
Part of Chinese (Traditional) translation .

File stats (Rust Fundamentals):

```
msggrep -v --location=src/{exercises/,}{android,bare-metal,concurrency,async}{.md,"/*","/*/*","/*/*/*"} po/zh-CN.po | msgfmt -o /dev/null --statistics -

1315 translated messages, 146 fuzzy translations, 149 untranslated messages.
```
2023-10-23 09:20:15 -07:00
Martin Geisler
cf798ae50e Fix malformed SUMMARY.md entries ()
These extra `)` were ignored by the `mdbook` parser, but they began
showing up in my testing of
https://github.com/google/mdbook-i18n-helpers/pull/100.
2023-10-23 09:26:15 -04:00
Qinglin
b155ffd40c Adds nodmp as a zh-CN translator () 2023-10-22 15:04:01 -07:00
justanotheranonymoususer
0c128d9357 Update std.md ()
Fix typo
2023-10-22 16:29:35 +02:00
justanotheranonymoususer
1dfb82c085 Update structs.md ()
Fix markdown
2023-10-22 16:24:04 +02:00
justanotheranonymoususer
c3abb35837 Update tuple-structs.md ()
Fix markdown
2023-10-22 16:13:39 +02:00
justanotheranonymoususer
0022898ada Update pattern-matching.md ()
Typo
2023-10-18 08:40:13 +02:00
justanotheranonymoususer
b8b274165c Update luhn.rs ()
Fix semicolon

I'm only learning Rust but I think it makes more sense
2023-10-18 03:53:14 +00:00
M1DOR1
c01b5ca6ed Simplify solution to Luhn exercise ()
Maybe we can use bool double and make the code easier to read and
comprehend
2023-10-17 13:35:34 +00:00
Martin Geisler
f94daaea73 Add “More to Explore” sections ()
From a discussion in .
2023-10-16 15:42:07 +02:00
Henri F
c2e9a45d49 Adds Chinese Simplified to the language drop-down ()
Graduates the Chinese Simplified translation to the language drop-down
selector. Part of 
2023-10-13 09:15:00 +02:00
Fabian Bornhofen
a0bb5f30d0 Add trait bound to example for MutexGuard that is !Send + Sync ()
This example only makes sense (and is therefore easier to understand
logically :) ) if T is Sync. See
https://github.com/rust-lang/rust/issues/41622 - this used to be a bug
initially.
2023-10-12 22:29:37 +02:00
Manish Kumar
358d7da22c Update catch_unwind example ()
Fixes .

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-10-12 15:27:45 +00:00
Seth Paydar
de0e8e6b6d fix: typo in mark_visited fn docstring ()
Fixes a typo in the `mark_visited` function docstring.

See [`HashSet.insert`
documentation](https://doc.rust-lang.org/stable/std/collections/struct.HashSet.html#method.insert)
2023-10-12 09:42:56 +00:00
Henri F
a46c6c19df Adds SketchK credit as a zh-CN translator () 2023-10-11 11:16:24 -05:00
Nick Radcliffe
b398b46a10 Update dining-philosophers-async.rs ()
Also replace Thales with Hypatia in the async version of Dining
Philosophers.
2023-10-11 13:35:08 +02:00
Nick Radcliffe
18f0ebf9dc Update dining-philosophers.rs ()
Replace Thales with Hypatia for slightly more inclusivity.
2023-10-11 13:34:12 +02:00
Noam Zaks
4eebe43f3b Fix typo: missing n in unknown () 2023-10-11 11:30:19 +01:00
Oscar
b037548923 Add mdbook-xgettext skip for untranslatable codeblocks in Bare Metal ()
See 

Removes 280 lines from `messages.pot`.

Signed-off-by: 0scvr <71343264+0scvr@users.noreply.github.com>
2023-10-11 09:32:12 +00:00
James Abley
2f50e8be84 Update debugging.md gdb command ()
The provided example did not work for me. I got:

`zsh: command not found: gdb-multiarch`

The other version worked instead. This might be a MacOS thing, or an
Apple Silicon thing. The other command is the same as used in
https://docs.rust-embedded.org/book/intro/install/macos.html so maybe
the MacOS installation guidance also needs updating?
2023-10-10 10:32:31 +01:00
Noam Zaks
ee48c4684a Fix typo: include semi colon in code () 2023-10-10 08:15:21 +00:00
Martin Geisler
7bffb7f2c4 Update mutable-static-variables.md ()
From a discussion in .
2023-10-09 15:15:26 +02:00
Martin Geisler
65f6dbcd85 Fix and expand Bare-metal Rust entry in glossary ()
The entry lacked the forced line-break of the other entries.
2023-10-09 11:29:14 +02:00
Martin Geisler
a7f7afa4a2 Format the glossary using a Markdown list ()
This format has two advantages:

- is easier to maintain in the Markdown file. Tables cannot be wrapped
in Markdown, which would severely limit what we can write for each term.
- it can be styled better. The layout now looks more like what you find
in a dictionary.

Before:


![image](https://github.com/google/comprehensive-rust/assets/89623/26bdc39e-4c1d-4f33-90d5-a1637712bcb8)

After:


![image](https://github.com/google/comprehensive-rust/assets/89623/38c1b329-4a80-4771-b415-425a537a0388)


Followup to .
2023-10-06 14:26:52 +02:00
Hidenori Kobayashi
8ff97f1ee7 Remove HTML tag <abbr> ()
The html tag seems to confuse the mdbook-i18n-helpers and make the
translation work hard ().

This simply replaces them with a set of parenthesis.
2023-10-06 10:38:48 +01:00
Nick Radcliffe
c93a4bc20c Remove unused import (use) ()
This should be a clean pull request with just the required diff
2023-10-05 11:17:48 +02:00
Nick Radcliffe
2072ed022b Fix typo (missing s on threads) ()
Again, a clean pull request for this typo.
2023-10-05 09:17:17 +00:00
Martin Geisler
5760e99e22 Introduce a glossary ()
The goal of this is twofold: give translators a place to document how
certain terms are translated as well as giving people a place to quickly
find a definition of a term. The slides might not always give a quick
definition the same way a glossary can.
2023-10-05 07:17:24 +02:00
Colin Finck
9d45db83b1 Add a "minimum wrong example" program in C ()
This example shows what kind of bugs easily slip into C code and are
made impossible via Rust.

I have created this example for the motivation slides of my master
thesis. Since then, the university institute has used it in their
introduction to Rust.
I hereby make this part available to the Comprehensive Rust course and
relicense it under the terms of the Apache 2.0 license.

Thank you @mgeisler for your invitation to contribute to this course!

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-10-04 13:26:37 +00:00
Martin Geisler
7395725edf Avoid naming struct field like trait method ()
The `name` struct field was confusing because it was named the same as
the trait method. The struct fields are now disjoint from the method
names — the fact that there are two separate name spaces is not the
point of these slides.

I also dropped the zero-sized type, this is also not the main focus
here.

I also compressed the code a bit to make the unimportant structs take
up less space.

Fixes .
2023-10-04 09:52:15 +00:00
Nick Radcliffe
a883a569d0 Remove unused callback from GUI exercise ()
Here's a possible update to the GUI/TUI exercise, taking out the
callback and explaining (slightly).

See what you think.

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-10-03 14:07:33 +00:00
Nick Radcliffe
0f768df367 Minor rewording of safe-ffi-wrapper exercise. ()
For readability.
2023-10-03 14:03:30 +00:00
Martin Geisler
9f079f173b Update all Cargo.lock files ()
This is the result of running `cargo update` in every directory.

It fixes a alert: https://github.com/advisories/GHSA-9mcr-873m-xcxp. We
don’t run any HTTP server directly, so this is not super important for
us. However, it will remove the alert from my dashboard.
2023-10-03 14:18:44 +02:00
Yuri Astrakhan
36449cb1b2 Add hash to rustdoc example ()
Hashes are important (and somewhat confusing to novices) part of the
rustdoc.
2023-10-02 14:23:46 +02:00