mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-04-01 09:32:10 +02:00
These are some minor updates from walking through the session myself. * Add some context to the `entry.S` slide, which is otherwise a bit terrifying for someone who does not speak ARM assembly. * Include a simple, fake example of MMIO. * Add a "Using It" section to the minimal UART segment, parallel to the better UART * Better explanation of the `unwrap` calls in the logging example. Unwrap is never "unsafe", so remove that word. * Allow dead code in some `.rs` files. * Remove redundant warning about use of memory before MMU setup. * Rephase text about buddy-system * Fix lint warning in spin slide.
451 B
451 B
Logging
It would be nice to be able to use the logging macros from the log
crate.
We can do this by implementing the Log
trait.
{{#include examples/src/logger.rs:main}}
- The first unwrap in
log
will succeed because we initialiseLOGGER
before callingset_logger
. The second will succeed becauseUart::write_str
always returnsOk
.