Multi building checkpoints #711
clippy
9 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 9 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.78.0-nightly (a84bb95a1 2024-02-13)
- cargo 1.78.0-nightly (fc1d58fd0 2024-02-09)
- clippy 0.1.78 (a84bb95 2024-02-13)
Annotations
Check failure on line 1089 in src/bitcoin/mod.rs
github-actions / clippy
the variable `removed_deposits` is used as a loop counter
error: the variable `removed_deposits` is used as a loop counter
--> src/bitcoin/mod.rs:1089:9
|
1089 | for dest in keys {
| ^^^^^^^^^^^^^^^^ help: consider using: `for (removed_deposits, dest) in keys.into_iter().enumerate()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_counter_loop
= note: `-D clippy::explicit-counter-loop` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::explicit_counter_loop)]`
Check failure on line 2528 in src/bitcoin/checkpoint.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
error: this expression creates a reference which is immediately dereferenced by the compiler
--> src/bitcoin/checkpoint.rs:2528:55
|
2528 | adjust_fee_rate(prev_fee_rate, false, &config)
| ^^^^^^^ help: change this to: `config`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 2521 in src/bitcoin/checkpoint.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
error: this expression creates a reference which is immediately dereferenced by the compiler
--> src/bitcoin/checkpoint.rs:2521:54
|
2521 | adjust_fee_rate(prev_fee_rate, true, &config)
| ^^^^^^^ help: change this to: `config`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `-D clippy::needless-borrow` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`
Check failure on line 1986 in src/bitcoin/checkpoint.rs
github-actions / clippy
question mark operator is useless here
error: question mark operator is useless here
--> src/bitcoin/checkpoint.rs:1986:9
|
1986 | Ok(self.get_mut(index)?)
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing question mark and `Ok()`: `self.get_mut(index)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
= note: `-D clippy::needless-question-mark` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_question_mark)]`
Check failure on line 1879 in src/bitcoin/checkpoint.rs
github-actions / clippy
unneeded `return` statement
error: unneeded `return` statement
--> src/bitcoin/checkpoint.rs:1879:25
|
1879 | Err(err) => return Err(err),
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `-D clippy::needless-return` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_return)]`
help: remove `return`
|
1879 | Err(err) => Err(err),
| ~~~~~~~~
Check failure on line 1632 in src/bitcoin/checkpoint.rs
github-actions / clippy
this function has too many arguments (8/7)
error: this function has too many arguments (8/7)
--> src/bitcoin/checkpoint.rs:1623:5
|
1623 | / pub fn advance(
1624 | | mut self,
1625 | | nbtc_accounts: &Accounts<Nbtc>,
1626 | | recovery_scripts: &Map<orga::coins::Address, Adapter<bitcoin::Script>>,
... |
1631 | | first: bool,
1632 | | ) -> Result<BuildingAdvanceRes> {
| |___________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `-D clippy::too-many-arguments` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::too_many_arguments)]`
Check failure on line 1082 in src/bitcoin/mod.rs
github-actions / clippy
variable `removed_deposits` is assigned to, but never used
error: variable `removed_deposits` is assigned to, but never used
--> src/bitcoin/mod.rs:1082:17
|
1082 | let mut removed_deposits = 0;
| ^^^^^^^^^^^^^^^^
|
= note: consider using `_removed_deposits` instead
= note: `-D unused-variables` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_variables)]`
Check failure on line 2534 in src/bitcoin/checkpoint.rs
github-actions / clippy
this `else { if .. }` block can be collapsed
error: this `else { if .. }` block can be collapsed
--> src/bitcoin/checkpoint.rs:2525:16
|
2525 | } else {
| ________________^
2526 | | if self.has_completed_checkpoint()? {
2527 | | // No unconfirmed checkpoints.
2528 | | adjust_fee_rate(prev_fee_rate, false, &config)
... |
2533 | | }
2534 | | };
| |_________^
|
= 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
|
2525 ~ } else if self.has_completed_checkpoint()? {
2526 + // No unconfirmed checkpoints.
2527 + adjust_fee_rate(prev_fee_rate, false, &config)
2528 + } else {
2529 + // This case only happens at start of chain - having no
2530 + // unconfs doesn't mean anything.
2531 + prev_fee_rate
2532 ~ };
|
Check failure on line 25 in src/bitcoin/checkpoint.rs
github-actions / clippy
unused import: `map::ReadOnly`
error: unused import: `map::ReadOnly`
--> src/bitcoin/checkpoint.rs:25:19
|
25 | collections::{map::ReadOnly, ChildMut, Deque, Map, Ref},
| ^^^^^^^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`