mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-02 04:48:27 +00:00
Auto-fixed clippy::unnecessary_map_or
This is a hacky approach, but does help a lot with the tedious fixes. See https://rust-lang.github.io/rust-clippy/master/index.html#/unnecessary_map_or ``` __CARGO_FIX_YOLO=1 cargo clippy --fix --all-targets --workspace --exclude gstreamer-player --exclude i-slint-backend-linuxkms --exclude uefi-demo --exclude ffmpeg -- -A clippy::all -W clippy::unnecessary_map_or cargo fmt --all ```
This commit is contained in:
parent
4ae2627ade
commit
bcb2953f00
61 changed files with 145 additions and 163 deletions
|
|
@ -21,7 +21,7 @@ pub(crate) fn fold_node(
|
|||
let parent = &state.lookup_change.scope[state.lookup_change.scope.len() - 2];
|
||||
|
||||
if !is_layout_base(parent) && !is_path(elem) && elem.borrow().is_legacy_syntax {
|
||||
let extend = elem.borrow().builtin_type().map_or(false, |b| {
|
||||
let extend = elem.borrow().builtin_type().is_some_and(|b| {
|
||||
b.default_size_binding
|
||||
!= i_slint_compiler::langtype::DefaultSizeBinding::ImplicitSize
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue