mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Remove call to non-existent Writer::new
The creation of a `Writer` is the same as before, so we omit it. Fixes #118
This commit is contained in:
@@ -232,8 +232,7 @@ The `Ok(())` is just a `Ok` Result containing the `()` type. We can drop the `pu
|
||||
Now we can use Rust's built-in `write!`/`writeln!` formatting macros:
|
||||
|
||||
```rust
|
||||
...
|
||||
let mut writer = Writer::new(Color::Blue, Color::LightGreen);
|
||||
let mut writer = Writer {...};
|
||||
writer.write_byte(b'H');
|
||||
writer.write_str("ello! ");
|
||||
write!(writer, "The numbers are {} and {}", 42, 1.0/3.0);
|
||||
|
||||
Reference in New Issue
Block a user