mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-17 06:47:49 +00:00
Fix links that pointed to a redirection page (#447)
This commit is contained in:
committed by
Philipp Oppermann
parent
3365a4f9ff
commit
3e570a8cfb
@@ -292,7 +292,7 @@ struct Buffer {
|
||||
```
|
||||
Instead of a `ScreenChar`, we're now using a `Volatile<ScreenChar>`. (The `Volatile` type is [generic] and can wrap (almost) any type). This ensures that we can't accidentally write to it through a “normal” write. Instead, we have to use the `write` method now.
|
||||
|
||||
[generic]: https://doc.rust-lang.org/book/generics.html
|
||||
[generic]: https://doc.rust-lang.org/book/second-edition/ch10-00-generics.html
|
||||
|
||||
This means that we have to update our `Writer::write_byte` method:
|
||||
|
||||
@@ -543,7 +543,7 @@ Note that we only have a single unsafe block in our code, which is needed to cre
|
||||
### A println Macro
|
||||
Now that we have a global writer, we can add a `println` macro that can be used from anywhere in the codebase. Rust's [macro syntax] is a bit strange, so we won't try to write a macro from scratch. Instead we look at the source of the [`println!` macro] in the standard library:
|
||||
|
||||
[macro syntax]: https://doc.rust-lang.org/nightly/book/macros.html
|
||||
[macro syntax]: https://doc.rust-lang.org/nightly/book/second-edition/appendix-04-macros.html
|
||||
[`println!` macro]: https://doc.rust-lang.org/nightly/std/macro.println!.html
|
||||
|
||||
```rust
|
||||
|
||||
Reference in New Issue
Block a user