cleanup trait implementation to match modifications

remove mutability from get_pixel
This commit is contained in:
bunnie 2025-02-28 16:36:24 +08:00
parent ebd9b6e823
commit 4710b416be

View file

@ -314,8 +314,8 @@ impl FrameBuffer for XousDisplay {
///
/// Note: this has not be carefully tested as this API is not used by the legacy code base.
/// Anyone using this API for the first time may benefit in checking that it is correct.
fn get_pixel(&mut self, p: Point) -> Option<ColorNative> {
let fb: &mut [u32] = unsafe { self.fb.as_slice_mut() };
fn get_pixel(&self, p: Point) -> Option<ColorNative> {
let fb: &[u32] = unsafe { self.fb.as_slice() };
let clip_y: usize;
if p.y >= LCD_LINES {
return None;