Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move import to sensible location in chapter 3 #1333

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading