Commit cff4757
committed
Resolve unnecessary_map_or clippy lints
warning: this `map_or` is redundant
--> gen/build/src/target.rs:31:20
|
31 | && dir
| ____________________^
32 | | .parent()
33 | | .map_or(false, |parent| parent.join("Cargo.toml").exists())
| |_______________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
help: use is_some_and instead
|
31 ~ && dir
32 + .parent().is_some_and(|parent| parent.join("Cargo.toml").exists())
|
warning: this `map_or` is redundant
--> gen/src/write.rs:1151:5
|
1151 | / sig.ret
1152 | | .as_ref()
1153 | | .map_or(false, |ret| sig.throws || types.needs_indirect_abi(ret))
| |_________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
= note: `-W clippy::unnecessary-map-or` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_map_or)]`
help: use is_some_and instead
|
1151 ~ sig.ret
1152 + .as_ref().is_some_and(|ret| sig.throws || types.needs_indirect_abi(ret))
|
warning: this `map_or` is redundant
--> macro/src/expand.rs:1837:5
|
1837 | / sig.ret
1838 | | .as_ref()
1839 | | .map_or(false, |ret| sig.throws || types.needs_indirect_abi(ret))
| |_________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
= note: `-W clippy::unnecessary-map-or` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_map_or)]`
help: use is_some_and instead
|
1837 ~ sig.ret
1838 + .as_ref().is_some_and(|ret| sig.throws || types.needs_indirect_abi(ret))
|1 parent d077e42 commit cff4757
3 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1150 | 1150 | | |
1151 | 1151 | | |
1152 | 1152 | | |
1153 | | - | |
| 1153 | + | |
1154 | 1154 | | |
1155 | 1155 | | |
1156 | 1156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1836 | 1836 | | |
1837 | 1837 | | |
1838 | 1838 | | |
1839 | | - | |
| 1839 | + | |
1840 | 1840 | | |
1841 | 1841 | | |
1842 | 1842 | | |
| |||
0 commit comments