Fix missing handling of preserve-unknown-fields on additionalProperties #179
GitHub Actions / clippy
succeeded
May 22, 2024 in 0s
clippy
3 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 3 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.80.0-nightly (791adf759 2024-05-21)
- cargo 1.80.0-nightly (0de7f2ec6 2024-05-17)
- clippy 0.1.80 (791adf7 2024-05-21)
Annotations
Check warning on line 371 in src/main.rs
github-actions / clippy
this `if` statement can be collapsed
warning: this `if` statement can be collapsed
--> src/main.rs:367:13
|
367 | / if derive.derived_trait == "Default" {
368 | | if (self.smart_derive_elision && !s.can_derive_default(containers)) || !s.is_enum {
369 | | continue;
370 | | }
371 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `#[warn(clippy::collapsible_if)]` on by default
help: collapse nested if block
|
367 ~ if derive.derived_trait == "Default" && ((self.smart_derive_elision && !s.can_derive_default(containers)) || !s.is_enum) {
368 + continue;
369 + }
|
Check warning on line 363 in src/analyzer.rs
github-actions / clippy
assigning the result of `Clone::clone()` may be inefficient
warning: assigning the result of `Clone::clone()` may be inefficient
--> src/analyzer.rs:363:17
|
363 | simple_inner = ix.type_.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `simple_inner.clone_from(&ix.type_)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
= note: `#[warn(clippy::assigning_clones)]` on by default
Check warning on line 118 in src/output.rs
github-actions / clippy
this `if` statement can be collapsed
warning: this `if` statement can be collapsed
--> src/output.rs:102:13
|
102 | / if !m.type_.contains('<')
103 | | && m.type_ != "String"
104 | | && m.type_ != "IntOrString"
105 | | && m.type_ != "NaiveDate"
... |
117 | | }
118 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `#[warn(clippy::collapsible_if)]` on by default
help: collapse nested if block
|
102 ~ if !m.type_.contains('<')
103 + && m.type_ != "String"
104 + && m.type_ != "IntOrString"
105 + && m.type_ != "NaiveDate"
106 + && m.type_ != "DateTime" && m.type_.chars().next().unwrap_or_default().is_uppercase() && containers
107 + .iter()
108 + .find(|c| c.name == m.type_)
109 + .is_some_and(|c| !c.can_derive_default(containers)) {
110 + self.supports_derive_default.set(false).unwrap();
111 + return false;
112 + }
|
Loading