From 66b4ccf6d028652e98f7a270f9d6174064b1e92e Mon Sep 17 00:00:00 2001 From: Daniel Beckwith Date: Tue, 31 Mar 2020 18:35:59 -0400 Subject: [PATCH] Fix lint --- src/writers/graphics_320x200x256.rs | 2 +- src/writers/graphics_640x480x16.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/writers/graphics_320x200x256.rs b/src/writers/graphics_320x200x256.rs index 6f55831..ba31144 100644 --- a/src/writers/graphics_320x200x256.rs +++ b/src/writers/graphics_320x200x256.rs @@ -97,7 +97,7 @@ impl Graphics320x200x256 { /// Returns the start of the `FrameBuffer` as `*mut u8` as /// well as a lock to the vga driver. This ensures the vga /// driver stays locked while the frame buffer is in use. - fn get_frame_buffer(&self) -> (SpinlockGuard, *mut u8) { + fn get_frame_buffer(self) -> (SpinlockGuard, *mut u8) { let mut vga = VGA.lock(); let frame_buffer = vga.get_frame_buffer(); (vga, u32::from(frame_buffer) as *mut u8) diff --git a/src/writers/graphics_640x480x16.rs b/src/writers/graphics_640x480x16.rs index 4cc8a45..3af89c7 100644 --- a/src/writers/graphics_640x480x16.rs +++ b/src/writers/graphics_640x480x16.rs @@ -106,7 +106,7 @@ impl Graphics640x480x16 { Graphics640x480x16 } - fn set_write_mode_0(&self, color: Color16) { + fn set_write_mode_0(self, color: Color16) { let (mut vga, _frame_buffer) = self.get_frame_buffer(); vga.graphics_controller_registers.write_set_reset(color); vga.graphics_controller_registers @@ -115,7 +115,7 @@ impl Graphics640x480x16 { .set_write_mode(WriteMode::Mode0); } - fn set_write_mode_2(&self) { + fn set_write_mode_2(self) { let (mut vga, _frame_buffer) = self.get_frame_buffer(); vga.graphics_controller_registers .set_write_mode(WriteMode::Mode2); @@ -127,14 +127,14 @@ impl Graphics640x480x16 { /// Returns the start of the `FrameBuffer` as `*mut u8` as /// well as a lock to the vga driver. This ensures the vga /// driver stays locked while the frame buffer is in use. - fn get_frame_buffer(&self) -> (SpinlockGuard, *mut u8) { + fn get_frame_buffer(self) -> (SpinlockGuard, *mut u8) { let mut vga = VGA.lock(); let frame_buffer = vga.get_frame_buffer(); (vga, u32::from(frame_buffer) as *mut u8) } #[inline] - fn _set_pixel(&self, x: usize, y: usize, color: Color16) { + fn _set_pixel(self, x: usize, y: usize, color: Color16) { let (mut vga, frame_buffer) = self.get_frame_buffer(); let offset = x / 8 + y * WIDTH_IN_BYTES; let pixel_mask = 0x80 >> (x & 0x07);