feat(oma-history): determine if the insert entry fails because `oma p… #1473
Annotations
1 error and 6 warnings
check-typo
Process completed with exit code 2.
|
check-typo:
oma-history/src/migrations.rs#L246
"timestemp" should be "timestamp".
|
check-typo:
oma-history/src/migrations.rs#L283
"timestemp" should be "timestamp".
|
check-typo:
oma-history/src/migrations.rs#L287
"timestemp" should be "timestamp".
|
check-typo:
oma-history/src/migrations.rs#L298
"timestemp" should be "timestamp".
|
this `else { if .. }` block can be collapsed:
oma-history/src/migrations.rs#L265
warning: this `else { if .. }` block can be collapsed
--> oma-history/src/migrations.rs:265:32
|
265 | } else {
| ________________________________^
266 | | if let Some(details) = v.get("details") {
267 | | let details =
268 | | serde_json::from_value::<Vec<RemoveTag>>(details.clone())
... |
275 | | }
276 | | }
| |_________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `#[warn(clippy::collapsible_else_if)]` on by default
help: collapse nested if block
|
265 ~ } else if let Some(details) = v.get("details") {
266 + let details =
267 + serde_json::from_value::<Vec<RemoveTag>>(details.clone())
268 + .unwrap_or_default();
269 + if details.contains(&RemoveTag::Purge)
270 + && v.get("version").is_some_and(|v| v.is_null())
271 + {
272 + is_clean_configure = true;
273 + }
274 + }
|
|
this `else { if .. }` block can be collapsed:
oma-history/src/migrations.rs#L265
warning: this `else { if .. }` block can be collapsed
--> oma-history/src/migrations.rs:265:32
|
265 | } else {
| ________________________________^
266 | | if let Some(details) = v.get("details") {
267 | | let details =
268 | | serde_json::from_value::<Vec<RemoveTag>>(details.clone())
... |
275 | | }
276 | | }
| |_________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `#[warn(clippy::collapsible_else_if)]` on by default
help: collapse nested if block
|
265 ~ } else if let Some(details) = v.get("details") {
266 + let details =
267 + serde_json::from_value::<Vec<RemoveTag>>(details.clone())
268 + .unwrap_or_default();
269 + if details.contains(&RemoveTag::Purge)
270 + && v.get("version").is_some_and(|v| v.is_null())
271 + {
272 + is_clean_configure = true;
273 + }
274 + }
|
|