Draw does not need mutable buffer

This commit is contained in:
Jeremy Soller 2022-10-25 11:40:57 -06:00
parent 330a736136
commit 5d7dd59078
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE

View file

@ -843,7 +843,7 @@ impl<'a> TextBuffer<'a> {
/// Draw the buffer /// Draw the buffer
#[cfg(feature = "swash")] #[cfg(feature = "swash")]
pub fn draw<F>(&mut self, cache: &mut crate::SwashCache, color: u32, mut f: F) pub fn draw<F>(&self, cache: &mut crate::SwashCache, color: u32, mut f: F)
where F: FnMut(i32, i32, u32, u32, u32) where F: FnMut(i32, i32, u32, u32, u32)
{ {
let font_size = self.metrics.font_size; let font_size = self.metrics.font_size;