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

1763 Commits

Author SHA1 Message Date
f103971cf4 Add @HidenoriKobayashi to CODEOWNERS for Japanese translation (#1997)
@HidenoriKobayashi has been working on Japanese translation very well so
it'd be nice to have him as a CODEOWNER
2024-04-16 14:11:34 +09:00
cb59f30a2e Fix Fibonacci sequence i.e. fib(0) -> 0. (#1996)
related Issue #1985
2024-04-15 20:07:44 +00:00
0a1ddadc83 cargo: bump nrf52833-hal from 0.16.1 to 0.17.0 in /src/bare-metal/microcontrollers/examples in the minor group (#1989)
Bumps the minor 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.1 to 0.17.0

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Walbran <qwandor@google.com>
2024-04-15 15:51:46 +00:00
06a2683cc7 Add missing import for try-conversions.md example (#1986)
Uncommenting the "write" line causes the example to fail compilation
because the compiler can't find `fs`.
2024-04-15 11:04:27 -04:00
70916261ad Exercise has a single function to implement (#1995)
Fixes #1993.
2024-04-15 10:37:59 -04:00
83e25e30ff uk: Chromium development (#1984)
uk: Chromium development

Signed-off-by: Andriy Redko <drreta@gmail.com>
2024-04-15 11:00:20 +01:00
956a1361f1 Bump crate-ci/typos from 1.20.4 to 1.20.8 (#1990)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.20.4 to
1.20.8.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-15 10:25:43 +01:00
029c8ac5ca cargo: bump cc from 1.0.91 to 1.0.94 in /src/exercises/bare-metal/rtc in the patch group (#1988)
Bumps the patch group in /src/exercises/bare-metal/rtc with 1 update:
[cc](https://github.com/rust-lang/cc-rs).

Updates `cc` from 1.0.91 to 1.0.94

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-15 10:25:12 +01:00
5df10096ac cargo: bump the patch group with 3 updates (#1987)
Bumps the patch group with 3 updates:
[anyhow](https://github.com/dtolnay/anyhow),
[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-04-15 10:24:49 +01:00
a4d674b02e Remove redundant trait bounds from counter exercise (#1980)
The trait bounds aren't needed on the struct definition, only the impl
block. I think it'd be useful to show the difference here in order to
show students how trait bounds for collection types are usually on the
impl blocks rather than the type itself.
2024-04-12 17:07:08 -04:00
b808887006 Add safety comments and use consistent format for existing ones. (#1981)
We should have safety comments on all `unsafe` blocks, to set a good
example.
2024-04-12 13:19:19 -04:00
8433ad9a3d Remove to_string from HashMap example (#1979)
While it's generally better in Rust code to use `String` as the key type
for a `HashMap` than `&str`, for the purposes of our examples having the
extra `to_string` calls makes the example more verbose and confusing for
students. The simple example will work as-is without the `to_string`
calls, so I think it's better to just remove them.
2024-04-12 13:17:20 -04:00
04c28ed641 Simplify if-let example (#1977)
I find that `if let` makes the most sense to use when you don't have an
`else` case, otherwise it's generally clearer to express the same thing
with a `match`. This changes the `if let` example to be (arguably) a bit
more idiomatic and less verbose.
2024-04-12 12:45:01 -04:00
d966750535 Uncomment setter in generics example (#1978)
I don't think it helps to have the example of a setter commented out in
the example. Uncommenting it and implementing it normally is more clear.
2024-04-12 11:15:46 -04:00
80b214117e Update README.md with mdbook-pandoc install (#1975) 2024-04-12 11:02:03 -04:00
9cc3e9c5ed Avoid fixed byte offsets in strings.md (#1963)
As discovered during #1961, fixed byte offsets tend to break
translations because the translated strings can end up having a
character on the boundary where we slice.
2024-04-09 19:30:58 +02:00
9ba6c8f8df fr: removing semi-deleted former translations. (#1970)
fr: removing semi-deleted former translations.
2024-04-09 19:30:45 +02:00
db316a70c6 uk: Android development (#1969)
uk: Android development

Signed-off-by: Andriy Redko <drreta@gmail.com>
2024-04-09 14:27:28 +01:00
611af00f78 vi: Welcome - Using Cargo translation (#1951)
Here is the translation of *Welcome to Comprehensive Rust: (2) Using
Cargo.*
2024-04-08 18:07:36 +02:00
8ed4d48aa5 Only save CI cache on main branch (#1962)
When a PR restores the cache, it will find the most recent cache from
the `main` branch. This cache should be mostly up to date.

We are constantly at the 10 GB limit for our CI caches, so removing the
extra caches from the many PR branches should ensure that we always have
space for the `main` branch caches.
2024-04-08 18:04:42 +02:00
13336fc428 Bump crate-ci/typos from 1.19.0 to 1.20.4 (#1968)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.19.0 to
1.20.4.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 15:48:59 +01:00
f5ca4e34fc cargo: bump the patch group with 2 updates (#1967)
Bumps the patch group with 2 updates:
[pulldown-cmark](https://github.com/raphlinus/pulldown-cmark) and
[reqwest](https://github.com/seanmonstar/reqwest).

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 11:40:01 +01:00
e8d78fde70 cargo: bump cc from 1.0.90 to 1.0.91 in /src/bare-metal/aps/examples in the patch group (#1966)
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.90 to 1.0.91

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 11:39:26 +01:00
4d8a89e6ab cargo: bump cc from 1.0.90 to 1.0.91 in /src/exercises/bare-metal/rtc in the patch group (#1965)
Bumps the patch group in /src/exercises/bare-metal/rtc with 1 update:
[cc](https://github.com/rust-lang/cc-rs).

Updates `cc` from 1.0.90 to 1.0.91

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 11:39:07 +01:00
620b8a3b72 Run mdbook test on translated code (#1961)
I made a small mistake during the refactor in #1492: I removed the
`MDBOOK_BOOK__LANGUAGE` environment variable, which means that we ended
up testing the original Rust code snippets again and again.

This commit also fixes the few typos that have sneaked into the
translations due to the lack of testing.
2024-04-07 19:38:18 +09:00
059c7129d1 fr: Refreshing the French translation (#1950)
fr: Refreshing the French translation (running msgmerge, not other
change).
2024-04-07 10:12:53 +02:00
73d1c63d11 ru: Update with messages.pot as of 2024-04-06 (#1959)
* Build `messages.pot` (untracked) using `gettext` with granularity=0;
* Update `ru.po` with `msgmerge --update`;
* Make it easier to review consequent translation-centric pull requests;

#326
2024-04-07 09:48:51 +02:00
b40857f6dd cargo: bump h2 from 0.3.24 to 0.3.26 (#1958)
Bumps [h2](https://github.com/hyperium/h2) from 0.3.24 to 0.3.26.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 16:18:22 +01:00
ff9a7b82b5 zh-TW: Translate the rest of index page (#1895)
#684

---------

Co-authored-by: Jonathan Hao <johnathan79717@gmail.com>
2024-04-05 13:15:18 +09:00
0b04007743 vi: Welcome - Running the Course translation (#1949)
The translation of *Welcome to Comprehensive Rust:
(1) Running the Course*.

I have followed the [Contributing
Guidelines](b38d429e49/CONTRIBUTING.md):

- [x] Edited by Poedit
- [x] Formatted by `dprint fmt`
- [x] Submitted to the CLA
2024-04-02 14:15:18 +00:00
6e8000e35d Bump actions/configure-pages from 4 to 5 (#1953)
Bumps
[actions/configure-pages](https://github.com/actions/configure-pages)
from 4 to 5.
2024-04-01 11:26:15 -04:00
18c5fe8065 cargo: bump the patch group in /src/exercises/bare-metal/rtc with 1 update (#1954)
Bumps the patch group in /src/exercises/bare-metal/rtc with 1 update:
[chrono](https://github.com/chronotope/chrono).
2024-04-01 11:25:04 -04:00
546ec48029 cargo: bump the minor group with 1 update (#1955)
Bumps the minor group with 1 update:
[tokio](https://github.com/tokio-rs/tokio).
2024-04-01 11:23:52 -04:00
cc0bd2190e cargo: bump the patch group with 3 updates (#1956)
Bumps the patch group with 3 updates:
[clap](https://github.com/clap-rs/clap),
[serde_json](https://github.com/serde-rs/json) and
[reqwest](https://github.com/seanmonstar/reqwest).
2024-04-01 11:22:57 -04:00
e2a4da2594 Add missing closing quotes in generic-traits.md (#1952) 2024-04-01 09:52:33 -04:00
b38d429e49 Fix example of niche optimization in Smart Pointers / Box<T> (#1946)
Example with linked list replaced by example with Option
2024-03-28 14:25:57 +00:00
6064631f50 Adding Vietnamese to the publish workflow. (#1933) 2024-03-26 10:47:13 -07:00
ec5d4afa19 Update move.md (#1944)
Fix the String length (and capacity) to make it less confusing.
2024-03-26 13:31:39 +00:00
f2601d15ae Improve readability of Multi-threaded Link Checker. (#1941) 2024-03-25 21:23:32 +00:00
c3a5fed1c3 uk: Day 4: afternoon (#1936)
uk: Day 4: afternoon

Signed-off-by: Andriy Redko <drreta@gmail.com>
2024-03-25 13:22:13 +00:00
47e285350f cargo: bump the patch group with 4 updates (#1940)
Bumps the patch group with 4 updates:
[regex](https://github.com/rust-lang/regex),
[serde_yaml](https://github.com/dtolnay/serde-yaml),
[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-25 10:04:44 +00:00
107ffeab41 cargo: bump the minor group in /src/exercises/bare-metal/rtc with 1 update (#1939)
Bumps the minor group in /src/exercises/bare-metal/rtc 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:02:30 +00:00
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