canvas: remove unnecessary mut on Canvas::get's self parameter.
This commit is contained in:
parent
5911610064
commit
ad02d7e945
@ -39,7 +39,7 @@ impl Canvas {
|
|||||||
}
|
}
|
||||||
self.pixels[x + y * self.width] = c;
|
self.pixels[x + y * self.width] = c;
|
||||||
}
|
}
|
||||||
pub fn get(&mut self, x: usize, y: usize) -> Color {
|
pub fn get(&self, x: usize, y: usize) -> Color {
|
||||||
self.pixels[x + y * self.width]
|
self.pixels[x + y * self.width]
|
||||||
}
|
}
|
||||||
pub fn write_to_file<P>(&self, path: P) -> Result<(), CanvasError>
|
pub fn write_to_file<P>(&self, path: P) -> Result<(), CanvasError>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user