return Err(ImageError::dimension_error())
}
- let mut img: RgbImage = rgb_encode(ImageBuffer::new(dim_x, dim_y), data)?;
+ let img: RgbImage = rgb_encode(ImageBuffer::new(dim_x, dim_y), data)?;
let tdim_x = dim_x * scale;
let tdim_y = dim_y * scale;
let tdim_x = 32 * scale;
let tdim_y = 32 * scale;
let img: RgbImage = {
- let mut canvas_option = &mut *canvas0.lock().unwrap();
+ let canvas_option = &mut *canvas0.lock().unwrap();
let canvas = canvas_option.take();
let canvas = rgb_encode_to_canvas(canvas.expect("Canvas doesn't exist!"), percent_decode_str(&data).into_iter().borrow_mut())?;
canvas_option.insert(canvas).img.clone()