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

1090 Commits

Author SHA1 Message Date
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
Enrico Rivarola
bb6fdeaa09
it: update translation (#974)
* Updating 'it' Translation

- MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot"}}' \
    mdbook build -d po
- msgmerge --update po/it.po po/messages.pot

* it: summary

* it: welcome

* it: 'Running the Course'

* it: using cargo

* it: Day 1 - Morning

* it: Fix attempt to resolve errors for the PR integration:

PR run failed: Test, Attempt #2 - it: update translation (9496e96):
https://github.com/google/comprehensive-rust/actions/runs/5544681099

* Minor fixes validated with @detro for PR merge (#974)
2023-07-20 17:59:42 +01:00
Dominik Maier
bd4839e394
Refer to Godbolt (#1011)
* Refer to Godbolt

* Apply suggestions from code review

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-07-20 15:46:50 +00:00
Martin Geisler
7bd1bcc99f
zh-TW: translate structs (#969)
* zh-TW: translate structs

Part of #684.

* zh-TW: Apply suggestion to speaker notes about newtypes.

* zh-TW: Apply suggestion to speaker notes about newtypes.

---------

Co-authored-by: Jonathan Hao <phao@google.com>
2023-07-19 21:46:41 -07:00
Martin Geisler
2cdbd933f6
zh-TW: translate unsafe (#966)
* zh-TW: translate unsafe

Part of #684.

* zh-TW: Update "read and write"

---------

Co-authored-by: Jonathan Hao <phao@google.com>
2023-07-19 21:45:41 -07:00
wnghl
e33ed49d74
zh-CN: translation for src/basic-syntax/string-slices.md (#767) 2023-07-19 12:52:42 -04:00
Martin Geisler
c83d164233
zh-TW: translate testing (#972)
* zh-TW: translate testing

Part of #684.

* zh-TW: Apply suggestion on proptest description

---------

Co-authored-by: Jonathan Hao <phao@google.com>
2023-07-19 15:58:39 +00:00
Kanta Yamaoka (山岡幹太)
86208e4435
ja: Translate chapter 46&47 (Threads) (#981)
* ja: first draft of Ch. 46&47, google#652

* ja: reflect review by @keiichiw, Ch. 46&47 google#652
2023-07-19 23:47:42 +09:00
Martin Geisler
a11d3afe8c
zh-CN: translate testing (#970)
Part of #324.
2023-07-19 09:29:42 +02:00
Louis Stanko
b8005ee37a
de: Translation until chapter 9.1 (#980)
* reformated de.po

* Apply suggestions from code review

Co-authored-by: ronaldfw <wotzlaw@gmail.com>

---------

Co-authored-by: ronaldfw <wotzlaw@gmail.com>
2023-07-18 13:29:24 -07:00
Martin Geisler
d4c08e6c9d
Remove statement that data is moved when assigning (#982)
* Remove statement that data is moved when assigning

The distinction between non-`Copy` and `Copy` types is tricky to explain. One problem is that people often focus on _moving_ vs _copying_ when both variable types always copy data.

This PR removes the statement about moving data (since that is wrong on its own).

* Apply suggestions from code review

Co-authored-by: Dustin J. Mitchell <djmitche@google.com>

* Apply suggestions from code review

Co-authored-by: Dustin J. Mitchell <djmitche@google.com>

---------

Co-authored-by: Dustin J. Mitchell <djmitche@google.com>
2023-07-18 08:52:26 -07:00
Dominik Maier
486458c72d
Memory Management: Rework Scope-based Cons (#998)
* Memory Management: Add classic ARC issues to Comparison

* replaced uaf reference (which needs misuse in C++)
2023-07-18 08:51:52 -07:00
Martin Geisler
cb45d322c7
Make installation URL more prominent (#1006)
* Make installation URL more prominent

This makes it more prominent that people should go to rustup.rs to install Rust.
2023-07-18 11:37:57 +00:00
Dominik Maier
2c3aa82af5
Filesystem slide rework (#1002)
* Filesystem slide rework (2015 is over)

* cleanup

* Cleanup text

* Specify "current versions"

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

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-07-18 13:32:45 +02:00
Martin Geisler
94e5db7ddb
Fix capitalization of Rust (#1007) 2023-07-18 12:41:27 +02:00
Henri Fontana
b0380e1f0e
pt-BR: Some updates and fixes (#994)
pt-BR: Some updates and fixes to the
Brazilian Portuguese translation.
2023-07-18 11:10:24 +01:00
Dominik Maier
2f86a259b6
Add Mutex information to Rc slide (#1001)
Add mutex information to Rc slide
2023-07-18 11:03:45 +02:00
Dominik Maier
0411d0c8e5
Additional sentence for derive macros (#1003) 2023-07-18 11:02:49 +02:00
Dominik Maier
640be0770a
Equal -> Equals for consistency (#1004)
* Equal -> Equals for consistency

* forgot one
2023-07-18 11:02:35 +02:00
Dominik Maier
46a38bc67a
Error is not yet available in core on stable (#1005) 2023-07-18 11:02:24 +02:00
Martin Geisler
3568823731
ko: refresh translation for async (#945)
* ko: refresh translation for async

Part of #925.

* Apply suggestions from code review

Co-authored-by: Jiyong Park <55639800+jiyongp@users.noreply.github.com>

* ko: move translations back to where they belong

Moving them back helps avoid conflicts. The outdated messages can be
cleaned up with `msgmerge` at a later point.

---------

Co-authored-by: Jiyong Park <55639800+jiyongp@users.noreply.github.com>
2023-07-18 08:27:13 +00:00
Martin Geisler
0234886c67
ko: refresh translation for error-handling (#948)
* ko: refresh translation for error-handling

Part of #925.

* ko: move translations back to where they belong

Moving them back helps avoid conflicts. The outdated messages can be
cleaned up with `msgmerge` at a later point.
2023-07-18 09:55:58 +02:00
Dominik Maier
ebbb696703
Rename confusing 'Double Free' (#1000) 2023-07-17 22:42:35 -07:00
Dominik Maier
797260b813
Use non-generic default (#999) 2023-07-17 22:38:48 -07:00
Dominik Maier
3f1a8d8ca1
Memory Management: Leaks are bad, RCE is worse (#997)
Leaks are bad, RCE is worse
2023-07-17 22:36:14 -07:00
Dominik Maier
aabe0c0a96
'Stack Memory' slide isn't really showing stack memory (#996) 2023-07-17 22:35:20 -07:00