refactor: fix clippy lints

This commit is contained in:
electria 2026-07-03 15:51:55 -07:00
commit d91a894b6c
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs

View file

@ -146,7 +146,7 @@ impl State {
} }
_ => { _ => {
let reader = match ImageReader::open(&path) { let reader = match ImageReader::open(path) {
Ok(r) => r, Ok(r) => r,
Err(e) => { Err(e) => {
return Some(format!( return Some(format!(
@ -266,7 +266,7 @@ impl State {
widget::image::allocate(widget::image::Handle::from_rgba( widget::image::allocate(widget::image::Handle::from_rgba(
image.width(), image.width(),
image.height(), image.height(),
unsafe { std::mem::transmute::<_, &'static [u8]>(image.as_bytes()) }, unsafe { std::mem::transmute::<&[u8], &'static [u8]>(image.as_bytes()) },
)) ))
.map(Message::ImageDisplayReady) .map(Message::ImageDisplayReady)
} }