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