diff --git a/blog/post/2015-10-23-printing-to-screen.md b/blog/post/2015-10-23-printing-to-screen.md index b190241b..bc9480d0 100644 --- a/blog/post/2015-10-23-printing-to-screen.md +++ b/blog/post/2015-10-23-printing-to-screen.md @@ -125,9 +125,9 @@ struct Buffer { chars: [[ScreenChar; BUFFER_WIDTH]; BUFFER_HEIGHT], } ``` -Since the field ordering in default structs is undefined in Rust, we need the [repr(C)] attribute. It guarantees that the struct's fields are laid out exactly like in a C struct and thus guarantees the correct field ordering. +Since the field ordering in default structs is undefined in Rust, we need the [repr(C\)] attribute. It guarantees that the struct's fields are laid out exactly like in a C struct and thus guarantees the correct field ordering. -[repr(C)]: https://doc.rust-lang.org/nightly/nomicon/other-reprs.html#reprc +[repr(C\)]: https://doc.rust-lang.org/nightly/nomicon/other-reprs.html#reprc To actually write to screen, we now create a writer type: