1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-15 14:27:50 +02:00
Commit Graph

1215 Commits

Author SHA1 Message Date
Dustin J. Mitchell
e596b80c03
Tweaks from student feedback (#1061)
* help students with the luhn exercise

* mention method-specific types in speaker notes

* Update src/exercises/day-2/luhn.md

Co-authored-by: Martin Geisler <martin@geisler.net>

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-08-11 12:40:05 +00:00
Dustin J. Mitchell
8956fab9bb
Put Ref/Cell on its own slide (#1062) 2023-08-11 08:39:30 -04:00
Martin Geisler
debaca9f7f
Add speaker notes for CXX page (#1060)
While we don’t have slides showing how to use the crate (#823), we can
at least explain at a high level what the instructor should focus on
when walking through the tutorial.
2023-08-11 13:00:10 +02:00
sakex
f79e6726cc
Add that the ? operator works with From<Err> (#1059) 2023-08-09 16:48:15 +02:00
Kanta Yamaoka (山岡幹太)
737cb9a496
ja: Translate chapter 48 (Channels) (#1053)
* ja: draft of Ch. 48 left old EN lines, google#652

* ja: reflect review by @keiichiw, Ch. 48 google#652
2023-08-09 18:06:51 +09:00
Danny Khosravi
c674d392a4
fa: Add Persian/Farsi language (#1042)
* A partial translation into Farsi
2023-08-09 10:01:02 +01:00
Martin Geisler
981360c19c
ko: refresh translation for bare-metal (#928)
Part of #925.

Co-authored-by: Jiyong Park <55639800+jiyongp@users.noreply.github.com>
2023-08-09 08:28:51 +00:00
Fabian Bornhofen
17c77d398a
Update course length in hello-world.md (#1055)
The fundamentals part is only three days long now
2023-08-07 21:36:54 +02:00
Kanta Yamaoka (山岡幹太)
8b330b7308
ja: refresh original EN content, google#652 (#1054) 2023-08-07 21:31:13 +09:00
Martin Geisler
3ff9e22480
zh-CN: translate generics (#965)
* zh-CN: translate generics

Part of #324.

* Apply suggestions from code review

Co-authored-by: wnghl <wnghilin@gmail.com>

---------

Co-authored-by: wnghl <wnghilin@gmail.com>
2023-08-07 09:24:26 +02:00
Martin Geisler
c23da457ae
Expand "iff" to "if and only if" (#1051)
There has been a few PRs which wanted to change "iff" to "if". Expanding it should help and avoid math-heavy jargon.
2023-08-04 12:52:36 +01:00
Martin Geisler
c7240f604f
Expand "iff" to "if and only if" in pl031.rs (#1052)
* Expand "if" to "if and only if" in pl031.rs

Similar to #1051.
2023-08-04 11:04:02 +01:00
Jonathan Hao
5c42b6c816
zh-TW: Align memory allocation translations (#1022)
According to https://rust-lang.tw/book-tw/ch04-01-what-is-ownership.html

Allocation => 配置
Deallocation => 釋放記憶體
Dropped => 被丟棄
2023-08-03 18:10:08 +09:00
Arman
560cad93e6
Fixed link (#1044) 2023-08-02 15:39:42 +00:00
sakex
b44a6f76c3
Fix print details toggle (#1048)
* Fix print details toggle

* Update speaker-notes.js

Co-authored-by: Martin Geisler <mgeisler@google.com>

---------

Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-08-02 15:42:42 +02:00
Martin Geisler
f04dd2e87e
Update exec plugin to latest version (#1046)
The latest version of `dprint` doesn't work with our old version of the `exec` plugin. This fixes the config based on https://github.com/dprint/dprint/issues/726.
2023-08-02 10:30:43 +01:00
Martin Geisler
8d9fddd92f
Rename welcome.md to index.md (#1039)
When building the book, mdBook will always generate an `index.html`
page for first page of the book. This meant that we had the same
content available under two different names:

- `welcome.html`: this is what the TOC would link to, and
- `index.html` or simply `/`: this is what search engines link to

Renaming the page and setting up a redirect should fix this confusion.
We still don’t have a good way of avoiding links to the `index.html`
page, but this should fix the first half of the problem.

I tested this for translations as well by building the output in a
subdirectory and serving the parent directory.

Part of #847.
2023-07-28 17:27:31 +02:00
sakex
98be9e149c
Talk about options in ? chapter (#600)
* Talk about options in `?` chapter

* Combine Option and Result examples

* Update try-operator.md

* Remove semicolon from expansion

* Focus on expansion of `expr?`

* Update try-operator.md

* Update try-operator.md

---------

Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-07-28 13:48:58 +02:00
Dominik Maier
a7a9ee84b4
Default trait slides cleanup (#1038)
* Default trait slides cleanup

* Update src/traits/default.md

Co-authored-by: Martin Geisler <martin@geisler.net>

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-07-27 13:53:47 +00:00
Martin Geisler
14bfd7b723
zh-TW: translate std (#964)
* zh-TW: translate std

Part of #684.

* Apply suggestions from code review

Co-authored-by: Jonathan Hao <phao@google.com>

* Apply suggestions from code review

* zh-TW: fix PO file syntax

We lost a few double-quotes in the editing process.

---------

Co-authored-by: Jonathan Hao <phao@google.com>
2023-07-27 11:47:12 +02:00
Martin Geisler
e364e020cb
zh-TW: fix line breaks in lists (#1036)
* zh-TW: fix line breaks in lists

I looked through the recent PRs for the Taiwanese translations and
found that some lists items had extra line breaks (without the
necessary indentation). This PR should fix the rendering.

Part of #684.

* Apply suggestions from code review

---------

Co-authored-by: Jonathan Hao <phao@google.com>
2023-07-27 11:37:54 +02:00
AdrienBaudemont
e1ef954d08
Translation fr (#1037)
* fr: update the translation on the Welcome page.

* fr: Some updates to summary.md entries, also removing a few fuzzy markers where the translation has not changed.
2023-07-27 11:29:10 +02:00
Yauheni Baltukha
d6f727307d
ru: Day 1: Morning translation (#903)
Translate Day 1: Morning
2023-07-26 22:21:31 +02:00
Jonathan Hao
3c6a8201bd
zh-TW: Fix indentation. (#1035) 2023-07-26 12:15:18 -04:00
Martin Geisler
785eb7cdf9
Mention Rust Fundamentals on Day 1 welcome (#1034)
Conceptually, I'm now thinking of Day 1 to Day 3 as belonging to "Rust Fundamentals", which together with the deep dives make up what we call "Comprehensive Rust".
2023-07-26 11:11:52 -04:00
sakex
e99df4ae5a
Rephrase static-and-const (#601)
* Rephrase static-and-const

* Reduce size, add table to compare static vs const
2023-07-26 14:15:50 +02:00
Andrew Walbran
bc972711a2
Clarify distinction between interior mutability and mutable statics. (#1019) 2023-07-26 13:22:42 +02:00
Martin Geisler
1afd67b318
zh-CN: translate unsafe (#963)
* zh-CN: translate unsafe

Part of #324.

* Apply suggestions from code review

Co-authored-by: whd <7058128+superwhd@users.noreply.github.com>

---------

Co-authored-by: whd <7058128+superwhd@users.noreply.github.com>
2023-07-26 08:46:35 +00:00
Martin Geisler
b0a9c630f2
Revert "std::mem::drop is in the prelude" (#1031)
Revert "`std::mem::drop` is in the prelude (#1027)"

This reverts commit 5a8bf5624d.
2023-07-26 10:31:25 +02:00
Martin Geisler
94ff8548fd
Explain what "Android team" means (#1032)
I hope this makes it a little clearer where the course comes from.
2023-07-25 15:21:58 +02:00
Martin Geisler
0980211db2
Introduce Rust Fundamentals on welcome page (#1029)
The split between Day 1 to 3 and the deep dives was never explicitly explained.
2023-07-25 15:04:32 +02:00
Martin Geisler
e9ddf3d9cf
Fix space in welcome.md (#1030) 2023-07-25 12:51:51 +01:00
Henri Fontana
53707c5943
pt-BR: Review / update of Android course (#1017)
* pt-BR: Catches up with latest PRs on the original
EN material

* pt-BR: Review / update of the Android course.
2023-07-25 09:34:05 +01:00
Martin Geisler
3c7659d59b
Align dining-philosophers-async.rs with sync version (#1024)
* Align dining-philosophers-async.rs with sync version

This updates the version to use `std::mem::swap` like the synchronous version.

* Apply suggestions from code review
2023-07-25 06:56:27 +00:00
Vito King
bf3ffa23ee
Fix self shorthand syntax (#1028)
Fix 'self' shorthand syntax
2023-07-25 08:54:41 +02:00
Martin Geisler
2c820e7bf3
Move thread::spawn to separate function (#1020)
This might make it clearer why the thread cannot borrow from the string.
2023-07-24 14:28:14 -07:00
Martin Geisler
dbb3217667
std::mem::drop is in the prelude (#1026) 2023-07-24 15:03:19 -04:00
Martin Geisler
5a8bf5624d
std::mem::drop is in the prelude (#1027) 2023-07-24 20:46:55 +02:00
Martin Geisler
e8ea741cea
Use Arc::clone instead of .clone() (#1023)
The fully qualified syntax is recommended for `Arc` which implements all methods as associated methods.
2023-07-24 11:19:06 -07:00
Martin Geisler
a2367b4d93
Use * foo: for list (#1025)
We could use an m-dash, but we're using `:` aligns with how the rest of the course is written.
2023-07-24 11:17:23 -07:00
Martin Geisler
707933c617
zh-TW: translate error-handling (#973)
* zh-TW: translate error-handling

Part of #684.

* Update zh-TW.po

Fix msgfmt lint error.

* Apply suggestions from code review

Co-authored-by: Jonathan Hao <phao@google.com>

* zh-TW: remove untranslated `msgstr` entries

* zh-TW: copy code samples as-is

The code can (but doesn’t have to be) translated.

---------

Co-authored-by: Henri Fontana <henrif75@users.noreply.github.com>
Co-authored-by: Jonathan Hao <phao@google.com>
2023-07-24 15:58:09 +00:00
Martin Geisler
34acff339d
zh-TW: translate enums (#865)
* zh-TW: translate enums

Part of #684.

* Apply suggestions from code review

Co-authored-by: Jonathan Hao <phao@google.com>

---------

Co-authored-by: Jonathan Hao <phao@google.com>
2023-07-24 15:56:59 +00:00
Martin Geisler
0a09079198
zh-TW: translate memory-management (#872)
* zh-TW: translate memory-management

Part of #684.

* Apply suggestions from code review

Co-authored-by: Jonathan Hao <phao@google.com>

* Update po/zh-TW.po

---------

Co-authored-by: Jonathan Hao <phao@google.com>
2023-07-24 15:54:11 +00:00
Martin Geisler
b8d2434719
zh-TW: translate traits (#971)
* zh-TW: translate traits

Part of #684.

* Update zh-TW.po

Fix msgfmt lint error.

* Apply suggestions from code review

Co-authored-by: Jonathan Hao <phao@google.com>

* zh-TW: replace “特徵邊界” with “特徵界限”

* Apply suggestions from code review

Co-authored-by: Jonathan Hao <phao@google.com>

---------

Co-authored-by: Henri Fontana <henrif75@users.noreply.github.com>
Co-authored-by: Jonathan Hao <phao@google.com>
2023-07-24 14:34:49 +00:00
Dominik Maier
2685d8ec0d
New is implied in square (#1010) 2023-07-24 08:10:47 -04:00
Shaurya Arora
f1058980e4
Update while-let-expressions.md (#1018)
Update code snippet description to use `v.into_iter()`
instead of `v.iter()` since the former is what's actually
used in the code snippet.
2023-07-23 21:02:20 -07:00
Martin Geisler
c0e79596d4
zh-CN: translate structs (#967)
Merged, thank you!
2023-07-22 10:52:58 -07:00
Martin Geisler
03bc5be016
Fix Godbolt typo (#1014) 2023-07-21 15:01:10 -07:00
Dominik Maier
6e367132ad
Remove unneeded macro from Enum Sizes slide (#1015)
* Remove unneeded macro from Enum Sizes slide

* Update src/enums/sizes.md

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-07-21 10:23:30 -04:00
Henri Fontana
e2038b4897
pt-BR: Catches up with latest PRs on the original EN text (#1008)
pt-BR: Catches up with latest PRs on the original
EN material
2023-07-21 09:39:37 +01:00