Eth consensus updates #802
GitHub Actions / clippy
failed
Oct 27, 2024 in 0s
clippy
1 error
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 1 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.81.0-nightly (506985649 2024-07-20)
- cargo 1.81.0-nightly (a2b58c3da 2024-07-16)
- clippy 0.1.81 (5069856 2024-07-20)
Annotations
Check failure on line 502 in src/app.rs
github-actions / clippy
this `else { if .. }` block can be collapsed
error: this `else { if .. }` block can be collapsed
--> src/app.rs:490:16
|
490 | } else {
| ________________^
491 | | if let Err(e) = self.credit_dest(dest.clone(), coins.take(amount)?, sender) {
492 | | log::debug!("Error crediting transfer: {:?}", e);
493 | | // TODO: ensure no errors can happen after mutating
... |
501 | | }
502 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `-D clippy::collapsible-else-if` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::collapsible_else_if)]`
help: collapse nested if block
|
490 ~ } else if let Err(e) = self.credit_dest(dest.clone(), coins.take(amount)?, sender) {
491 + log::debug!("Error crediting transfer: {:?}", e);
492 + // TODO: ensure no errors can happen after mutating
493 + // state in credit_dest since state won't be reverted
494 +
495 + // Assume coins passed into credit_dest are burnt,
496 + // replace them in `coins`
497 + coins.give(Coin::mint(amount))?;
498 + } else {
499 + succeeded = true;
500 + }
|
Loading