1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-08-10 09:09:19 +02:00
Commit Graph

2306 Commits

Author SHA1 Message Date
Hugo Drumond Jacob
6caf2a7f61 CODEOWNERS: initial check-in (#382)
That's the initial check-in of the CODEOWNERS file.

By reading through the [CODEOWNERS documentation](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners), it's not clear to me whether a default assignee (e.g `* <someone>`) is needed, though.
2023-02-10 15:04:07 +01:00
rastringer
36985195e4 Additional work on Brazilian Portuguese translation (#355)
* Add Brazilian Portuguese translation

Adds Brazilian Portuguese translation. Day 1 is respectable and the most glaring machine translation errors are removed throughout. There will of course be exceptions at this early stage.

Conventions: followed standards of the Rust Book translation at https://rust-br.github.io/rust-book-pt-br/ for guidance on Anglicization of programming vocab.

Generally where words refer to a type, method etc in Rust, I switch the translation to English (eg 'Enum', 'read') and stick to the Portuguese when the word refers to an abstract concept (eg shadowing, sombreamento).

The entire 20k lines have been parsed to remove all over-eager translations, many of course of which were in the code blocks ('let mut x / deixe mut x).
Variable / struct names (eg Pessoa -> Person) have been translated so the code runs, comments and some print statements are left in Portuguese.
2023-02-10 13:49:37 +01:00
gendx
710fd526b4 Clarification in Trait Objects. (#379) 2023-02-09 21:51:08 +00:00
gendx
91eec89c52 Clarify that trait bounds give access to methods and add example of impl Trait. (#378) 2023-02-09 21:50:34 +00:00
gendx
f912825411 Add documentation links to the important traits. (#377)
* Add documentation links to the important traits.

* Also add links in the sub-pages.
2023-02-09 21:47:47 +00:00
gendx
fbb12161eb Mention rc::Weak and add an example with a cycle in the speaker notes. (#375) 2023-02-09 21:46:40 +00:00
gendx
f9f04651ce Add more example methods to Vec and HashMap. (#373) 2023-02-09 21:45:43 +00:00
Charisee Chiw
3a734230c9 Update visibility.md (#357) 2023-02-09 21:19:56 +00:00
Charisee Chiw
cf931075d5 Update destructuring-arrays.md (#369)
* Update destructuring-arrays.md

* Update destructuring-arrays.md
2023-02-09 13:17:33 -08:00
Charisee Chiw
6a1282c166 Update for-expressions.md (#359)
* Update for-expressions.md

* Update for-expressions.md

* Update for-expressions.md

* Fix formatting.

---------

Co-authored-by: Andrew Walbran <qwandor@google.com>
2023-02-09 21:17:15 +00:00
Charisee Chiw
65340c4ca1 Update match-expressions.md (#367)
* Update match-expressions.md

* Apply suggestions from code review

Fine tuning the casing and explanations.

---------

Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-02-09 13:16:30 -08:00
Marko Zagar
36ce63cb10 Updates and minor fixes to Day 2: Morning (#372) 2023-02-09 21:15:47 +00:00
Charisee Chiw
e3b4b6a5c7 Update box.md (#363) 2023-02-09 20:55:19 +00:00
Charisee Chiw
736de71c7c Update loop-expressions.md (#362)
* Update loop-expressions.md

* Update loop-expressions.md

* Fix formatting.

---------

Co-authored-by: Andrew Walbran <qwandor@google.com>
2023-02-09 20:52:37 +00:00
Charisee Chiw
1587d796cb Update modules.md (#358)
* Update modules.md

* Update modules.md

* Fix capitalisation and formatting.

---------

Co-authored-by: Andrew Walbran <qwandor@google.com>
2023-02-09 20:50:43 +00:00
Charisee Chiw
426d7d91c2 Update points-polygons.md (#361) 2023-02-09 20:49:35 +00:00
Charisee Chiw
aa316544c3 Update box-recursive.md (#360) 2023-02-09 20:49:00 +00:00
Martin Geisler
c4bc10e31d Inline variables printed with println! and friends (#315)
The course follows the style of inlining variable names where possible
in `println!` statements.
2023-02-09 07:48:18 +01:00
gendx
ce19841249 Add highly-unsafe speaker notes to inspect the memory layout of string. (#341) 2023-02-09 07:47:15 +01:00
Jooyung Han
6df343736a Fix Day 2 (morning part) of the Korean translation (#327)
* fix: korean translation for day2

This covers 12, 13, 14 in TOC.

* Refine ko-translation regarding match with enum

---------

Co-authored-by: Jooyung Han <jooyung@google.com>
2023-02-09 12:18:40 +09:00
Jiyong Park
cc9c39cc16 Fix Day 4 of the Korean translation (#351)
* Fix Day 4 morning of the Korean translation

* Fix newline issues

* KO translation for day 4 afternoon

* Address comments from jooyunghan
2023-02-09 12:17:07 +09:00
Charisee Chiw
1835896e58 Speaker notes for destructuring-structs.md (#265)
* Update destructuring-structs.md

* Update destructuring-structs.md
2023-02-07 07:42:57 +00:00
Martin Geisler
f90fecb449 Add hint about using a PO editor (#356) 2023-02-06 20:17:36 +01:00
Igor Petruk
ab831de1da Suggesting to add Default to important traits. (#243)
* Suggesting to add `Default` to important traits.

This is a great trait to know about, it is used very often.

* Change `Implemented` to tuple struct.

It saves vertical space.
2023-02-06 20:17:21 +01:00
karthicktamil
fd82a95e85 Update welcome-day-1.md (#350)
Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-02-06 18:47:53 +00:00
gendx
0be6f639bd Add a totally-unsafe example to show the discriminant optimization of Options. (#345) 2023-02-06 17:41:54 +01:00
gendx
c3e3dc6020 Add speaker notes for pattern-matching/destructuring-arrays.md (#346) 2023-02-06 17:38:01 +01:00
Martin Geisler
413098cdac Upload build output as artifacts (#342)
This makes it super easy for translators to see the results of their
work: every PR will now have a list of artifacts, one per translation.
2023-02-06 17:20:32 +01:00
Martin Geisler
f9dea3d7a3 Setup redirects after #120 and #177 (#352)
This makes `mdbook` output a simple redirect at the location of the
old pages. I’ll try to add such pages when we shuffle around our
pages to make sure external links stay valid.
2023-02-06 17:10:01 +01:00
Ronald Wotzlaw
13b2c300ce Start of the German translation 2023-02-06 11:56:48 +01:00
Becker A
6361b2ed63 Update welcome-day-1.md (#349)
fix grammar typo
2023-02-06 07:34:55 +00:00
Jiyong Park
9fc203b217 Refine KO translation up to the day 1 part (#302)
Co-authored-by: Evan kim <keispace.kyj@gmail.com>
2023-02-06 12:57:19 +09:00
gendx
2e076cabe7 Reference mdbook installation instructions from running-the-course.md. (#329) 2023-02-03 15:52:06 +00:00
gendx
cc4509f90c Add historical reference to the Rust 1.0 release. (#335) 2023-02-03 15:51:41 +00:00
gendx
bd98d03b44 Remove dangling links in cargo/rust-ecosystem.md. (#332) 2023-02-03 15:50:15 +00:00
Robin Stringer
06c7346979 Add Brazilian Portuguese translation (#340)
* Add Brazilian Portuguese translation

Adds Brazilian Portuguese translation. Day 1 is respectable and the most glaring machine translation errors are removed throughout. There will of course be exceptions at this early stage.

Conventions: followed standards of the Rust Book translation at https://rust-br.github.io/rust-book-pt-br/
for guidance on Anglicization of programming vocab.
Generally where words refer to a type, method etc in Rust, I switch the translation to English (eg 'Enum', 'read') and stick to the Portuguese when the word refers to an abstract concept (eg shadowing, sombreamento).
The entire 20k lines have been parsed to remove all over-eager translations, many of course of which were in the code blocks ('let mut x / deixe mut x).
Variable / struct names (eg Pessoa -> Person) have been translated so the code runs, comments and some print statements are left in Portuguese.
Assistance welcomed!

* Update pt_BR.po
2023-02-03 15:41:25 +00:00
gendx
ace97aaeb2 Fix typo in basic-syntax/variables.md. (#339) 2023-02-03 15:30:44 +00:00
gendx
b5518e9b16 Add a solution for day 1's bonus question with generics. (#338) 2023-02-03 15:29:49 +00:00
gendx
1936cd5c85 Mention that the syntax is similar to Java as well. (#337) 2023-02-03 15:28:38 +00:00
gendx
22d2bd36e4 Add reference to rustfmt for Debian instructions. (#331) 2023-02-03 15:18:03 +00:00
Andrew Gaul
f33b1f923a Use f-string in example for consistency (#328)
Also fix typo.
2023-02-03 13:07:29 +00:00
Andrew Walbran
1be641203e Split out example to separate page. (#319)
The example is quite long and so the page didn't easily fit on the
same screen as the explanation
2023-02-03 10:12:31 +00:00
Andrew Walbran
20f02db5f5 Add a cargo workspace containing both crates (#321)
* Move Cargo.toml for exercises to exercises directory.

* Create a workspace with both exercises and i18n-helpers.

* Build in CI as well as testing.

* Binaries must have a main function.

* No need for workspaces configuration for caching anymore.
2023-02-02 16:14:34 +00:00
Martin Geisler
a07bfa108f Wrap long line of code (#312)
This line was too big to show during class.
2023-02-01 12:34:10 +01:00
Martin Geisler
476ee283c6 Simplify Vec slide (#313)
The code is probably meant to illustrate the `vec!` macro, but it
feels out of place when teaching: there is already enough material
here to get through.
2023-02-01 10:49:11 +01:00
Martin Geisler
d6182ea498 Fix missing word (#311) 2023-01-31 20:09:00 +00:00
Martin Geisler
c6a54ce9a9 Show the pair returned by duplicate (#314)
This makes it easier to talk about the code as you make changes to the
`duplicate` function.
2023-01-31 21:08:09 +01:00
Martin Geisler
dee5e654c8 Fix order of standard library slides (#310)
The slides now follow the order on the intro slide.
2023-01-31 15:04:17 -05:00
Frieder Bluemle
fd65ff0f0c Fix JetBrains capitalization (#305)
* Fix JetBrains capitalization

* Revert change to da.po

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-01-31 19:45:54 +00:00
lodisy
330d21ef02 Update traits.md 2023-01-31 11:07:24 +00:00