Skip to content

Commit

Permalink
Move import to sensible location in chapter 3
Browse files Browse the repository at this point in the history
It served no purpose in the previous code block and would only confuse the user
  • Loading branch information
proudmuslim-dev authored Jul 4, 2024
1 parent ca86085 commit d565cd1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions blog/content/edition-3/posts/03-screen-output/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ In the new module, we create basic structs for representing pixel positions and
```rust ,hl_lines=3-16
// in new kernel/src/framebuffer.rs file

use bootloader_api::info::FrameBuffer;

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Position {
pub x: usize,
Expand Down Expand Up @@ -180,7 +178,7 @@ Next, we create a function for setting a specific pixel in the framebuffer to a
```rust ,hl_lines=3 5-39
// in new kernel/src/framebuffer.rs file

use bootloader_api::info::PixelFormat;
use bootloader_api::info::{FrameBuffer, PixelFormat};

pub fn set_pixel_in(framebuffer: &mut FrameBuffer, position: Position, color: Color) {
let info = framebuffer.info();
Expand Down

0 comments on commit d565cd1

Please sign in to comment.