When reading the code without an IDE, I find it useful to use explicit
module names, especially when items come from the standard library.
So `io::Error` instead of just `Error`, especially when people have
just been told about `std::error::Error` as well.
I also omitted most single-use items: I find it has less cognitive
overhead to say “we import `fmt`” and then later use `fmt::Display`
and `fmt::Formatter` in the code. It’s clear from the name that these
two things have something to do with formatting.
Finally, I made a few usages more consistent so that we refer to each
item in the same way within a single codeblock.
Despite good intentions, I have not actually been able to make this
work in a classroom.
I suggest we remove it for now and later replace it with a guided
exercise: something where we ask students to write a AIDL client for a
simple system service.
The style used in the rest of the course is _italic_ filenames, so we
should be careful to not suddenly use **bold** names.
The style is of course up for debate, but we need to ensure
consistency first.
- Avoid time-specific statements (“recently”, “today”, …).
- Move details such as “RPIT” to the speaker notes.
- More links to our slides as well as community documentation.
- Formatting fixes
Niche optimization is currently mentioned in three places:
- Enums (User-Defined Types, Day 1 Afternoon)
- Option (Standard Library Types, Day 2 Afternoon)
- Box (Smart Pointers, Day 3 Morning)
This is a tricky thing to get right, and it was just in the speaker
notes in each place. #1820 will introduce a fuller explanation.
Fixes#1820.
We have not formally introduced ownership at this point, so the
exercise can be confusing for students.
Alternatively, we could consider removing the `finish` method since
it’s not essential for a first encounter with methods.
The exercise is about iterators, _not_ generic integer types. The
`where` syntax has also not been introduced before, further adding
confusion for the students.
We don’t have a convention of all-capital headings. However, we can
have do a similar convention with a block quotes (see README and
TRANSLATIONS).
Reviewed-by: Martin Geisler <mgeisler@google.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.1.15 to 1.1.23
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/bare-metal/aps/examples with 1 update:
[cc](https://github.com/rust-lang/cc-rs).
Updates `cc` from 1.1.15 to 1.1.23
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/alloc-example with 1 update:
[buddy_system_allocator](https://github.com/rcore-os/buddy_system_allocator).
Updates `buddy_system_allocator` from 0.10.0 to 0.11.0
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
In this exercise, the original StderrLogger output to stderr, which user
cannot see the original log but "No output" in frontend". Change
`eprintln!` to `println!` to make it see-able in the frontend. Also, due
to the change, rename the logger struct.
Close: #2382
Signed-off-by: Alx-Lai <alexabc722@gmail.com>