Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Feb 28, 2024
1 parent 4989eac commit c274e3b
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions core/tauri/src/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,18 +186,20 @@ impl<'a> TryFrom<JsIcon<'a>> for Image<'a> {
} => Ok(Self::new(rgba, width, height)),

#[cfg(not(any(feature = "image-ico", feature = "image-png")))]
_ => Err(Error::new(
ErrorKind::InvalidInput,
format!(
"expected RGBA image data, found {}",
match img {
JsIcon::Path(_) => "a file path",
JsIcon::Bytes(_) => "raw bytes",
_ => unreachable!(),
}
),
))
.map_err(Into::into),
_ => Err(
Error::new(
ErrorKind::InvalidInput,
format!(
"expected RGBA image data, found {}",
match img {
JsIcon::Path(_) => "a file path",
JsIcon::Bytes(_) => "raw bytes",
_ => unreachable!(),
}
),
)
.into(),
),
}
}
}

0 comments on commit c274e3b

Please sign in to comment.