refactor: fix clippy lints
This commit is contained in:
parent
bba0ec5682
commit
d91a894b6c
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue