mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Janitor: Fix clippy::match_like_matches_macro
This commit is contained in:
parent
d543bc3a1d
commit
97be634b9b
2 changed files with 2 additions and 8 deletions
|
@ -1077,10 +1077,7 @@ pub fn instantiate(
|
||||||
component_box.instance.as_ptr().cast(),
|
component_box.instance.as_ptr().cast(),
|
||||||
));
|
));
|
||||||
|
|
||||||
let is_state_info = match property_type {
|
let is_state_info = matches!(property_type, Type::Struct { name: Some(name), .. } if name.ends_with("::StateInfo"));
|
||||||
Type::Struct { name: Some(name), .. } if name.ends_with("::StateInfo") => true,
|
|
||||||
_ => false,
|
|
||||||
};
|
|
||||||
if is_state_info {
|
if is_state_info {
|
||||||
let prop = Pin::new_unchecked(
|
let prop = Pin::new_unchecked(
|
||||||
&*(instance_ref.as_ptr().add(*offset)
|
&*(instance_ref.as_ptr().add(*offset)
|
||||||
|
|
|
@ -369,10 +369,7 @@ impl CachedImage {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn is_on_gpu(&self) -> bool {
|
pub(crate) fn is_on_gpu(&self) -> bool {
|
||||||
match &*self.0.borrow() {
|
matches!(&*self.0.borrow(), ImageData::Texture(_))
|
||||||
ImageData::Texture(_) => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn to_rgba(&self) -> Option<image::RgbaImage> {
|
pub(crate) fn to_rgba(&self) -> Option<image::RgbaImage> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue