mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-30 22:01:13 +00:00
Janitor: Fix clippy::if_let_some_result
This commit is contained in:
parent
97be634b9b
commit
1c21ba89ee
1 changed files with 2 additions and 2 deletions
|
@ -1136,8 +1136,8 @@ impl ItemRenderer for GLItemRenderer {
|
||||||
update_fn(&mut |width: u32, height: u32, data: &[u8]| {
|
update_fn(&mut |width: u32, height: u32, data: &[u8]| {
|
||||||
use rgb::FromSlice;
|
use rgb::FromSlice;
|
||||||
let img = imgref::Img::new(data.as_rgba(), width as usize, height as usize);
|
let img = imgref::Img::new(data.as_rgba(), width as usize, height as usize);
|
||||||
if let Some(image_id) =
|
if let Ok(image_id) =
|
||||||
canvas.borrow_mut().create_image(img, femtovg::ImageFlags::PREMULTIPLIED).ok()
|
canvas.borrow_mut().create_image(img, femtovg::ImageFlags::PREMULTIPLIED)
|
||||||
{
|
{
|
||||||
cached_image = Some(ItemGraphicsCacheEntry::Image(Rc::new(
|
cached_image = Some(ItemGraphicsCacheEntry::Image(Rc::new(
|
||||||
CachedImage::new_on_gpu(canvas, image_id),
|
CachedImage::new_on_gpu(canvas, image_id),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue