Commit 7bbaabc
committed
fix(clippy): box OAuthFlows and use slice::contains
Two clippy errors caught only with `--all-features -- -D warnings`:
- large_enum_variant: SecurityScheme::OAuth2 carried OAuthFlows directly
(~817 bytes); other variants ~97 bytes. Box it so the enum's variants
are similarly sized.
- manual_contains: schema_types.iter().any(|t| *t == X) → contains(&X).
Plus drop the only `expect_used` in catalog-gen.rs by replacing the
`get_mut(...).expect(...)` with an `if let Some(...)` guard.
`cargo clippy --all-features -- -D warnings` is now clean.
Refs #141 parent 0f4b80f commit 7bbaabc
2 files changed
Lines changed: 10 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
221 | 219 | | |
222 | 220 | | |
223 | 221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
450 | 453 | | |
451 | 454 | | |
452 | 455 | | |
| |||
600 | 603 | | |
601 | 604 | | |
602 | 605 | | |
603 | | - | |
| 606 | + | |
604 | 607 | | |
605 | 608 | | |
606 | 609 | | |
| |||
0 commit comments