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.99 to 1.0.100
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the minor group in /src/bare-metal/microcontrollers/examples with
1 update: [microbit-v2](https://github.com/nrf-rs/microbit).
Updates `microbit-v2` from 0.14.0 to 0.15.0
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the minor group with 1 update:
[lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs).
Updates `lazy_static` from 1.4.0 to 1.5.0
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the minor group with 2 updates in the
/src/exercises/bare-metal/compass directory:
[lsm303agr](https://github.com/eldruin/lsm303agr-rs) and
[microbit-v2](https://github.com/nrf-rs/microbit).
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.99 to 1.0.100
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the patch group with 2 updates in the / directory:
[serde_json](https://github.com/serde-rs/json) 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>
This uses the `rustfmt` from the stable toolchain, instead of nightly.
At the moment, nightly's `rustfmt` is nonfunctional, but in general we
don't need bleeding-edge formatting (and in fact, the more often
formatting changes, the more often we'll get spurious failures on PRs,
as we are today).
Fixes#2165.
The type returned by `String::from_utf8(raw)`, is `Result<_>` and needs
to be mapped to match the type of the return type of `next`. You get
this error otherwise:
```
Compiling playground v0.0.1 (/playground)
warning: unused import: `ErrorKind`
--> src/main.rs:1:21
|
1 | use std::io::{self, ErrorKind};
| ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
error[E0308]: mismatched types
--> src/main.rs:29:17
|
29 | Ok(Some(s))
| ---- ^ expected `String`, found `Result<String, FromUtf8Error>`
| |
| arguments to this enum variant are incorrect
|
= note: expected struct `String`
found enum `Result<String, FromUtf8Error>`
help: the type constructed contains `Result<String, FromUtf8Error>` due to the type of the argument passed
--> src/main.rs:29:12
|
29 | Ok(Some(s))
| ^^^^^-^
| |
| this argument influences the type of `Some`
note: tuple variant defined here
--> /playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:579:5
|
579 | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
| ^^^^
help: use the `?` operator to extract the `Result<String, FromUtf8Error>` value, propagating a `Result::Err` value to the caller
|
29 | Ok(Some(s?))
| +
For more information about this error, try `rustc --explain E0308`.
warning: `playground` (bin "playground") generated 1 warning
error: could not compile `playground` (bin "playground") due to 1 previous error; 1 warning emitted
```
Professional translations for CR2 content.
Changes are being staged in a separate branch until all Japanese content
is reviewed.
#1463#652
---------
Co-authored-by: Hidenori Kobayashi <hidenorik@chromium.org>
Updating `fa.po` translations based on the latest changes. If we merge
this before the #2038, it's easier to review that merge request.
Related to #671.
Co-authored-by: Mehrad Rousta <mehrad@protonmail.com>
Undefined behavior does not just mean that the behavior can be different
on different platforms. It is much worse than that: the runtime behavior
can be completely nonsensical since the whole program has undefined
behavior.
The compiler will optimizer as if there is no undefined behavior and
will can lead to strange situations as the compiler concludes that
things like `a > a + 1000` can never be reached if `a` is a signed 8-bit
value (since reaching it would trigger undefined behavior).
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.98 to 1.0.99
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.98 to 1.0.99
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
The speaker notes suggest an evolution of the code to support a periodic
timer, but the last step was under-specified.
(As mentioned by @fw-immunant and referenced in #1536)
Bumps the minor group with 1 update:
[tokio](https://github.com/tokio-rs/tokio).
Updates `tokio` from 1.37.0 to 1.38.0
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This PR merges the Japanese (ja) 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 2103 | bat -l patch
#1463#652
---------
Co-authored-by: Kanta Yamaoka (山岡幹太) <49053649+kantasv@users.noreply.github.com>
Co-authored-by: Hidenori Kobayashi <hidenorik@chromium.org>
I've been thinking it'd be simpler to introduce `dyn Trait` via `&dyn
Trait` rather than waiting for the smart pointers section and `Box<dyn
Trait>`. This PR adds a slide to the Generics section that introduces
`&dyn Trait` and compares it to `&impl Trait`, juxtaposing
monomorphization and static dispatch against type-erasure and dynamic
dispatch. I've then updated the existing trait object slide to call back
to the earlier introduction, and call out that using `Box<dyn Trait>`
gives you an owned trait object rather than a borrowed one.
Add a note to the `Copy` slide noting that shared references are `Copy`.
A student asked about this today, and it's something I want to remember
to mention in future classes.
The English contents has changed, leading to untranslated session
outline and schedule because the msgid no longer match the original
contents. Additionally, incorrect file names are listed in the comment.
This PR follow the steps outlined in [Refreshing an Existing
Translation](https://github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md#refreshing-an-existing-translation)
to refresh the Vietnamese translation file. After the update, some
translated session outlines were no longer appropriated, so this PR also
updates all of them