mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 02:39:28 +00:00
Clippy polish
This commit is contained in:
parent
8345c6cd79
commit
e02c360000
75 changed files with 361 additions and 419 deletions
|
@ -708,12 +708,12 @@ impl<'a> PropertyLookupResult<'a> {
|
|||
|
||||
/// Can this property be used in an assignment
|
||||
pub fn is_valid_for_assignment(&self) -> bool {
|
||||
match (self.property_visibility, self.is_local_to_component) {
|
||||
(PropertyVisibility::Private, false) => false,
|
||||
(PropertyVisibility::Input, true) => false,
|
||||
(PropertyVisibility::Output, false) => false,
|
||||
_ => true,
|
||||
}
|
||||
!matches!(
|
||||
(self.property_visibility, self.is_local_to_component),
|
||||
(PropertyVisibility::Private, false)
|
||||
| (PropertyVisibility::Input, true)
|
||||
| (PropertyVisibility::Output, false)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -812,7 +812,7 @@ pub fn unit_product_length_conversion(
|
|||
units[Unit::Px as usize] = 0;
|
||||
units[Unit::Phx as usize] = 0;
|
||||
units[Unit::Rem as usize] = 0;
|
||||
units.into_iter().all(|x| x == 0).then(|| result)
|
||||
units.into_iter().all(|x| x == 0).then_some(result)
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue