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:
Philipp Oppermann
2016-01-17 13:23:27 +01:00
parent 1284ea3657
commit a6632af0b6

View File

@@ -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: Now we can use Rust's built-in `write!`/`writeln!` formatting macros:
```rust ```rust
... let mut writer = Writer {...};
let mut writer = Writer::new(Color::Blue, Color::LightGreen);
writer.write_byte(b'H'); writer.write_byte(b'H');
writer.write_str("ello! "); writer.write_str("ello! ");
write!(writer, "The numbers are {} and {}", 42, 1.0/3.0); write!(writer, "The numbers are {} and {}", 42, 1.0/3.0);