1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-06-15 05:40:30 +02:00
Commit Graph

1721 Commits

Author SHA1 Message Date
4d1f40917f cargo: bump the minor group with 1 update (#1938)
Bumps the minor group with 1 update:
[reqwest](https://github.com/seanmonstar/reqwest).

Updates `reqwest` from 0.11.26 to 0.12.1

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-25 10:02:01 +00:00
b4774ceb75 cargo: bump the minor group in /src/bare-metal/aps/examples with 1 update (#1937)
Bumps the minor group in /src/bare-metal/aps/examples with 1 update:
[bitflags](https://github.com/bitflags/bitflags).

Updates `bitflags` from 2.4.2 to 2.5.0

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-25 10:01:26 +00:00
d5b92dbb5f Temporarily disable saving playground state (#1935)
When browing around on https://google.github.io/comprehensive-rust/, I
sooner or later end up in a state where the local storage has `[]`
stored for a page with one or more playgrounds. The effect of this is
that the code is removed from the page!

I am not sure why this happens, but I’m afraid the code here needs more
testing. I’m teaching a class Monday morning, so I’ll disable the code
from #1917 for now.
2024-03-24 23:25:00 +01:00
44ba3ec461 Fix misspelling of implementing (#1934) 2024-03-24 22:00:10 +00:00
eff410cd1a Update CODEOWNERS with Vietnamese (#1932)
Add @daivinhtran as Vietnamese codeowner.
2024-03-24 22:57:35 +01:00
c54b7fa918 Vietnamese translation: initial setup (#1929) 2024-03-22 14:39:52 -07:00
6fc747aa05 Update labeler.yml with Vietnamese (#1931) 2024-03-22 16:55:06 +00:00
b7a6e3b46d Saving playground code state (#1917)
The embedded Playground's code reset when you navigate between slides.
This has caused problems: if people navigate away from a slide to look
something up, they've suddenly lost their work.
2024-03-22 12:15:54 -04:00
6b3eb83bff Move mpsc::Sender to the list of Send + Sync types (#1930)
As of 1.72.0, `mpsc::Sender` [is
`Sync`](https://doc.rust-lang.org/std/sync/mpsc/struct.Sender.html#impl-Sync-for-Sender%3CT%3E).
2024-03-22 10:27:11 -04:00
4726252989 uk: Day 4: morning (#1910)
Day 4: morning

Signed-off-by: Andriy Redko <drreta@gmail.com>
2024-03-22 14:12:18 +00:00
842bea8748 BN Translations: Updated translations upto 20% (#1925)
This PR aims to include the new translations and minor corrections in
the previous ones. This bumps the BN translations completion from 12% to
20%.

Ref: Issue #653

Co-authored-by: abhik-bits <127435906+abhik-bits@users.noreply.github.com>
2024-03-22 05:21:52 +00:00
a46bb1389a ko: CR2 Chromium translations (#1922)
Chromium translations from CR v.2

#262 #1463
2024-03-20 09:45:48 -07:00
a2924391e2 A simple fix in the day (#1927) 2024-03-20 12:12:49 -04:00
e5e33a1159 Removed destructuring about struct (#1924)
#1464 issue . Let's limit this section to arrays and tuples.
Destructuring in structs explained in [Day-2
Morning]((https://google.github.io/comprehensive-rust/pattern-matching/destructuring.html)).
2024-03-19 16:49:26 -04:00
b06cc21c39 Add redirect for static-and-const (#1923)
I missed this in #1881 before clicking "merge".
2024-03-19 09:55:15 -04:00
3facea27d4 cargo: bump the patch group with 5 updates (#1926)
Bumps the patch group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.80` | `1.0.81` |
| [clap](https://github.com/clap-rs/clap) | `4.5.2` | `4.5.3` |
| [serde_yaml](https://github.com/dtolnay/serde-yaml) | `0.9.32` |
`0.9.33` |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.57` |
`1.0.58` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.11.25` |
`0.11.26` |

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-18 09:41:01 +00:00
c633f85f57 Updated static and const (#1881)
Updated the content for space issue .
#1464 issue.
2024-03-15 09:01:41 -04:00
b4be1d0123 ko: Refreshes .po file (#1921)
This is a clean refresh, requires only a syntactic review.

You can skim this PR with the [GitHub CLI](https://cli.github.com/):

```
gh pr diff 1921 | bat -l patch
```

#262
2024-03-15 04:59:08 -07:00
7cd25c0262 Move slices and strings to references section (#1898)
This PR moves the slides for slices and strings into the day 1 section
on references. This seems like the more natural place to introduce
slices since slices are a type of reference. It then also made sense to
me to follow that with the introduction of `&str` and `String`, since
students now have the context to understand what a "string slice" is. I
also removed the strings slide from the types and values section since
it didn't make sense to cover the same topic twice in the same day. I
tested this new organization in my class on Wednesday and it didn't
cause day 1 to take too long.
2024-03-14 16:21:15 -04:00
4b27e28e7f Update bounded.md (#1919)
Shouldn't it be `recv` instead of `read`? I don't see a `read` function
in Receiver.
2024-03-12 20:48:54 +00:00
8dbe80331b ko: Merge CR v.2 Korean translation back into main (#1918)
This PR merges the Korean (ko) v.2 translation back to main.
This requires just a syntactical review, as the partial PRs into this
branch were reviewed already.

**The Chromium translation is still pending but I realized it's better
to get this out and start benefiting users in the other modules.**

You can skim this PR with the [GitHub CLI](https://cli.github.com/):

gh pr diff 1918 | bat -l patch

#1463 #284

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Andriy Redko <drreta@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Geisler <mgeisler@google.com>
2024-03-12 07:34:07 -07:00
ac2cb44d54 Cover Supertraits, Generic Traits (#1854) 2024-03-12 13:49:39 +00:00
d0656ca90b Simplify generic min exercise (#1900)
I was a bit dissatisfied with the test code for the generic min
exercise. We were supposed to be testing that the student wrote the
generic function correctly, but we only test their `min` function with
one type. I rewrote the exercise to test against multiple types, which
required that we use the regular `Ord` trait rather than a custom one. I
tend to prefer using the real items from `std` when we can because it's
a good way to get students familiar with the standard library. I also
removed the custom `Citation` type since it wasn't really important to
the exercise.
2024-03-11 18:33:03 -04:00
025fbffa99 Remove generics from logger exercise (#1899)
The logger exercise comes before the section on generics, and the
purpose of the exercise is for students to get practice writing a trait
implementation, so using generics in the solution is a source of
confusion for students. I've removed the generic and made
`VerbosityFilter` directly hold a `StderrLogger`.
2024-03-11 16:30:38 -04:00
9059a1aa38 Update fibonacci exercise.rs (#1909) 2024-03-11 14:09:47 +00:00
595ecbcaa7 cargo: bump the minor group with 1 update (#1914)
Bumps the minor group with 1 update:
[http](https://github.com/hyperium/http).

Updates `http` from 1.0.0 to 1.1.0

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 10:50:44 +00:00
e6b62f465c cargo: bump the patch group in /src/exercises/bare-metal/rtc with 2 updates (#1913)
Bumps the patch group in /src/exercises/bare-metal/rtc with 2 updates:
[chrono](https://github.com/chronotope/chrono) and
[cc](https://github.com/rust-lang/cc-rs).

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 10:50:28 +00:00
eb3dd875fb cargo: bump the patch group in /src/bare-metal/aps/examples with 1 update (#1916)
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.0.88 to 1.0.90

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 10:28:39 +00:00
a265ca3222 cargo: bump the patch group with 4 updates (#1915)
Bumps the patch group with 4 updates:
[clap](https://github.com/clap-rs/clap),
[reqwest](https://github.com/seanmonstar/reqwest),
[cxx](https://github.com/dtolnay/cxx) and
[cxx-build](https://github.com/dtolnay/cxx).

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 10:28:24 +00:00
dc597531fd cargo: bump the patch group in /src/bare-metal/microcontrollers/examples with 1 update (#1912)
Bumps the patch group in /src/bare-metal/microcontrollers/examples with
1 update: [nrf52833-hal](https://github.com/nrf-rs/nrf-hal).

Updates `nrf52833-hal` from 0.16.0 to 0.16.1

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 10:27:03 +00:00
fa29bcf662 Refreshed Bengali Translations and Added New Translations to Bengali (#1876)
This PR aims to do the following:
1. Refresh the Bengali Translations
2. Add new translations in line with #653 to complete up to 10%.
3. Corrections to existing translations.

Edit: Recent commits bump up the % completed to 12.

---------

Co-authored-by: abhik-bits <127435906+abhik-bits@users.noreply.github.com>
Co-authored-by: Mir Wasi Ahmed <1697945+mirwasi@users.noreply.github.com>
2024-03-07 19:14:49 +00:00
3ac3b301bc Fix typo in associated-types.md (#1887)
A minor nitpick, but as someone new to the language I did spend a bit
more time than I'd like to admit trying to understand the meaning of
`allow` before realizing this is likely a typo. Maybe I still don't
understand, and in that case I'd appreciate a correction!
2024-03-07 13:56:30 +00:00
97ac0e7caf set fallback fonts for PDF rendering (#1728)
Once a new version of Pandoc is released that includes
https://github.com/jgm/pandoc/pull/9204 and
https://github.com/jgm/pandoc/pull/9353 (both merged), this will fix the
emoji and symbol rendering issues in #1708.

It doesn't seem to be possible to set fallback fonts with
`luatexja-fontspec` (used to configure CJK fonts), which results in some
missing symbols in the translations but at least renders the emoji
properly.

Closes #1708
2024-03-07 14:37:52 +01:00
e362b44b66 concurrency: Update async trait slide (#1883)
Clarify that the basics are stable, but dyn support is still missing.
This slide was outdated and didn't explain the current state of stable
correctly.
2024-03-06 16:37:48 -05:00
42f6e1186e Do not show trait vtables as located in the heap in memory diagram (#1882)
This diagram is misleading and I often explain that the character data
of string literals resides in the executable's static data, with vtables
working the same.
2024-03-06 16:22:16 -05:00
976f6f6f24 concurrency: Add detailed teaching notes for welcome and threads slides (#1885)
These follow the flow of what I actually teach, which spends a
significant amount of time on the latter slide. I think it's worthwhile
to have a real flow documented in the teaching notes, both to make sure
nothing gets forgotten and to structure the experience of teaching.
2024-03-06 21:11:52 +00:00
429694fa63 Tweak solution to iter exercise (#1884)
Because `.zip()` is limited to the shorter length, the `.take()` call
here is unnecessary. When explaining this solution I don't want to have
to explain a call to a method that, used as it is, does nothing.
2024-03-06 20:18:31 +00:00
c866c13b68 Retire @duyguisler as a Turkish reviewer (#1880)
Thanks for the work so far, feel free to come back if you have more
time!
2024-03-06 17:04:53 +00:00
9404a22b15 Make diagram consistent with code (#1855) 2024-03-06 17:12:09 +01:00
f00981c663 Divided Array and tuples (#1859)
#1824 PR Changes
2024-03-06 09:24:01 -05:00
a1dc31b9d7 tr: cr2 update changes (#1865)
updated for cr2 and added some translations

Part of #500
2024-03-06 13:50:53 +01:00
437b73b24f es: Merge CR v.2 Spanish translation back into main (#1879)
This PR merges the Spanish (es) v.2 translation back to main.
This requires just a syntactical review, as the partial PRs into this
branch were reviewed already.

You can skim this PR with the [GitHub CLI](https://cli.github.com/):

gh pr diff 1879 | bat -l patch

#1463 #284

---------

Co-authored-by: David Martínez Martí <deavid@google.com>
2024-03-05 14:38:58 -08:00
13cf920e08 Fix some typos (#1864)
Signed-off-by: geekvest <cuimoman@sohu.com>
2024-03-05 16:28:55 -05:00
259a8ac08e cargo: bump mio from 0.8.10 to 0.8.11 (#1877)
Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.10 to 0.8.11.
2024-03-05 11:53:17 +01:00
0761f936ca Add a dev theme to help with slide aspect ratio (#1842)
Added a dev theme to help with slide aspect ratio while updating content
or for reviewing PRs.

Fixes #1796.

---------

Co-authored-by: Dustin J. Mitchell <djmitche@google.com>
Co-authored-by: Martin Geisler <martin@geisler.net>
2024-03-05 10:33:42 +00:00
c509dbd9e4 Always install and run mdbook-pandoc (#1713)
Before, we only installed and ran `mdbook-pandoc` when publishing the
course — which means that a PR change could accidentally break the
publish workflow. We now test that it works on every PR.

From a discussion in #1704.
2024-03-04 16:25:58 +01:00
1b3984df20 Move Mockall and GoogleTest slides to Android section (#1533)
After #1528 and #1532, we now have actual slides which showcase the
crates in action. So we can reclaim a few minutes by removing the slide
which mentions Mockall and GoogleTest slide.

The slide mentioned [proptest](https://docs.rs/proptest) and
[rstest](https://docs.rs/rstest) as well. While I'm sure the libraries
are useful, we don't have them imported into AOSP and I've never
personally used them. We should therefore not advertise them yet at this
point since they won't be useful to Android engineers.

Of course we can mention things that are not in AOSP (or in Chromium),
but I think we should do it in the speaker notes at most.
2024-03-04 16:25:35 +01:00
c763932288 Small formatting fix (#1866)
This is a typo, that actually @mgeisler stopped in my previous PR, I was
just not around to fix it fast enough to make it to the previous merge.
Thanks for the catch!
2024-03-04 09:46:59 -05:00
e74a8b77bd URGENT: Fix course schedule watcher github action (#1867)
@djmitche Currently all PRs are marked as schedule change PRs.

This is my try to propose a fix for this, but please review diligently,
I'm no github actions expert, and I don't have an environment to test.
2024-03-04 09:39:30 -05:00
9a72b87fa9 cargo: bump the minor group with 2 updates (#1870)
Bumps the minor group with 2 updates:
[scraper](https://github.com/causal-agent/scraper) 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-03-04 11:37:43 +00:00