Skip to content

fix review notes

fix review notes #119

GitHub Actions / Clippy (nightly) failed Nov 7, 2023 in 3s

Clippy (nightly)

2 errors, 154 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 2
Warning 154
Note 0
Help 0

Versions

  • rustc 1.75.0-nightly (189d6c71f 2023-11-06)
  • cargo 1.75.0-nightly (65e297d1e 2023-11-03)
  • clippy 0.1.75 (189d6c7 2023-11-06)

Annotations

Check warning on line 477 in zcash_client_sqlite/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> zcash_client_sqlite/src/lib.rs:477:50
    |
477 |             let tx_ref = wallet::put_tx_data(up, &sent_tx.tx, Some(sent_tx.created))?;
    |                                                  ^^^^^^^^^^^ help: change this to: `sent_tx.tx`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 415 in zcash_client_sqlite/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> zcash_client_sqlite/src/lib.rs:415:54
    |
415 |                 let tx_row = wallet::put_tx_meta(up, &tx, block.block_height)?;
    |                                                      ^^^ help: change this to: `tx`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 410 in zcash_client_sqlite/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> zcash_client_sqlite/src/lib.rs:410:17
    |
410 |                 &block.commitment_tree,
    |                 ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `block.commitment_tree`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 765 in zcash_client_sqlite/src/wallet.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> zcash_client_sqlite/src/wallet.rs:765:25
    |
765 | pub fn insert_sent_note<'a, P: consensus::Parameters>(
    |                         ^^
766 |     stmts: &mut DataConnStmtCache<'a, P>,
    |                                   ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
765 ~ pub fn insert_sent_note<P: consensus::Parameters>(
766 ~     stmts: &mut DataConnStmtCache<'_, P>,
    |

Check warning on line 718 in zcash_client_sqlite/src/wallet.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> zcash_client_sqlite/src/wallet.rs:718:22
    |
718 | pub fn put_sent_note<'a, P: consensus::Parameters>(
    |                      ^^
719 |     stmts: &mut DataConnStmtCache<'a, P>,
    |                                   ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
718 ~ pub fn put_sent_note<P: consensus::Parameters>(
719 ~     stmts: &mut DataConnStmtCache<'_, P>,
    |

Check warning on line 680 in zcash_client_sqlite/src/wallet.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> zcash_client_sqlite/src/wallet.rs:680:23
    |
680 | pub fn insert_witness<'a, P>(
    |                       ^^
681 |     stmts: &mut DataConnStmtCache<'a, P>,
    |                                   ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
680 ~ pub fn insert_witness<P>(
681 ~     stmts: &mut DataConnStmtCache<'_, P>,
    |

Check warning on line 662 in zcash_client_sqlite/src/wallet.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> zcash_client_sqlite/src/wallet.rs:662:55
    |
662 |         stmts.stmt_insert_received_note.execute_named(&sql_args)?;
    |                                                       ^^^^^^^^^ help: change this to: `sql_args`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 660 in zcash_client_sqlite/src/wallet.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> zcash_client_sqlite/src/wallet.rs:660:54
    |
660 |     if stmts.stmt_update_received_note.execute_named(&sql_args)? == 0 {
    |                                                      ^^^^^^^^^ help: change this to: `sql_args`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 631 in zcash_client_sqlite/src/wallet.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> zcash_client_sqlite/src/wallet.rs:631:26
    |
631 | pub fn put_received_note<'a, P, T: ShieldedOutput>(
    |                          ^^
632 |     stmts: &mut DataConnStmtCache<'a, P>,
    |                                   ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
631 ~ pub fn put_received_note<P, T: ShieldedOutput>(
632 ~     stmts: &mut DataConnStmtCache<'_, P>,
    |

Check warning on line 616 in zcash_client_sqlite/src/wallet.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> zcash_client_sqlite/src/wallet.rs:616:19
    |
616 | pub fn mark_spent<'a, P>(
    |                   ^^
617 |     stmts: &mut DataConnStmtCache<'a, P>,
    |                                   ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
616 ~ pub fn mark_spent<P>(
617 ~     stmts: &mut DataConnStmtCache<'_, P>,
    |

Check warning on line 578 in zcash_client_sqlite/src/wallet.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> zcash_client_sqlite/src/wallet.rs:578:20
    |
578 | pub fn put_tx_data<'a, P>(
    |                    ^^
579 |     stmts: &mut DataConnStmtCache<'a, P>,
    |                                   ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
578 ~ pub fn put_tx_data<P>(
579 ~     stmts: &mut DataConnStmtCache<'_, P>,
    |

Check warning on line 551 in zcash_client_sqlite/src/wallet.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> zcash_client_sqlite/src/wallet.rs:551:20
    |
551 | pub fn put_tx_meta<'a, P, N>(
    |                    ^^
552 |     stmts: &mut DataConnStmtCache<'a, P>,
    |                                   ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
551 ~ pub fn put_tx_meta<P, N>(
552 ~     stmts: &mut DataConnStmtCache<'_, P>,
    |

Check warning on line 529 in zcash_client_sqlite/src/wallet.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> zcash_client_sqlite/src/wallet.rs:529:21
    |
529 | pub fn insert_block<'a, P>(
    |                     ^^
530 |     stmts: &mut DataConnStmtCache<'a, P>,
    |                                   ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
    = note: `-W clippy::needless-lifetimes` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
    |
529 ~ pub fn insert_block<P>(
530 ~     stmts: &mut DataConnStmtCache<'_, P>,
    |

Check warning on line 363 in zcash_client_sqlite/src/for_async/mod.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> zcash_client_sqlite/src/for_async/mod.rs:363:38
    |
363 |             update_ops.store_sent_tx(&sent_tx)
    |                                      ^^^^^^^^ help: change this to: `sent_tx`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 350 in zcash_client_sqlite/src/for_async/mod.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> zcash_client_sqlite/src/for_async/mod.rs:350:42
    |
350 |             update_ops.store_received_tx(&received_tx)
    |                                          ^^^^^^^^^^^^ help: change this to: `received_tx`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 338 in zcash_client_sqlite/src/for_async/mod.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> zcash_client_sqlite/src/for_async/mod.rs:338:41
    |
338 |             update_ops.advance_by_block(&block, updated_witnesses)
    |                                         ^^^^^^ help: change this to: `block`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
    = note: `-W clippy::needless-borrow` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrow)]`

Check warning on line 662 in zcash_client_sqlite/src/wallet.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

use of deprecated method `rusqlite::Statement::<'_>::execute_named`: You can use `execute` with named params now.

warning: use of deprecated method `rusqlite::Statement::<'_>::execute_named`: You can use `execute` with named params now.
   --> zcash_client_sqlite/src/wallet.rs:662:41
    |
662 |         stmts.stmt_insert_received_note.execute_named(&sql_args)?;
    |                                         ^^^^^^^^^^^^^

Check warning on line 660 in zcash_client_sqlite/src/wallet.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

use of deprecated method `rusqlite::Statement::<'_>::execute_named`: You can use `execute` with named params now.

warning: use of deprecated method `rusqlite::Statement::<'_>::execute_named`: You can use `execute` with named params now.
   --> zcash_client_sqlite/src/wallet.rs:660:40
    |
660 |     if stmts.stmt_update_received_note.execute_named(&sql_args)? == 0 {
    |                                        ^^^^^^^^^^^^^

Check failure on line 627 in zcash_client_sqlite/src/wallet/transact.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

the trait bound `&[i64; 1]: rusqlite::Params` is not satisfied

error[E0277]: the trait bound `&[i64; 1]: rusqlite::Params` is not satisfied
   --> zcash_client_sqlite/src/wallet/transact.rs:627:21
    |
624 |                 .query_row(
    |                  --------- required by a bound introduced by this call
...
627 |                     &[tx_row],
    |                     ^^^^^^^^^ the trait `rusqlite::Params` is not implemented for `&[i64; 1]`
    |
note: required by a bound in `rusqlite::Connection::query_row`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rusqlite-0.28.0/src/lib.rs:666:12
    |
664 |     pub fn query_row<T, P, F>(&self, sql: &str, params: P, f: F) -> Result<T>
    |            --------- required by a bound in this associated function
665 |     where
666 |         P: Params,
    |            ^^^^^^ required by this bound in `Connection::query_row`
help: consider removing the leading `&`-reference
    |
627 -                     &[tx_row],
627 +                     [tx_row],
    |

Check failure on line 614 in zcash_client_sqlite/src/wallet/transact.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

the trait bound `&[i64; 1]: rusqlite::Params` is not satisfied

error[E0277]: the trait bound `&[i64; 1]: rusqlite::Params` is not satisfied
   --> zcash_client_sqlite/src/wallet/transact.rs:614:21
    |
611 |                 .query_row(
    |                  --------- required by a bound introduced by this call
...
614 |                     &[tx_row],
    |                     ^^^^^^^^^ the trait `rusqlite::Params` is not implemented for `&[i64; 1]`
    |
note: required by a bound in `rusqlite::Connection::query_row`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rusqlite-0.28.0/src/lib.rs:666:12
    |
664 |     pub fn query_row<T, P, F>(&self, sql: &str, params: P, f: F) -> Result<T>
    |            --------- required by a bound in this associated function
665 |     where
666 |         P: Params,
    |            ^^^^^^ required by this bound in `Connection::query_row`
help: consider removing the leading `&`-reference
    |
614 -                     &[tx_row],
614 +                     [tx_row],
    |

Check warning on line 137 in zcash_client_sqlite/src/wallet/transact.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

use of deprecated method `rusqlite::Statement::<'_>::query_and_then_named`: You can use `query_and_then` with named params now.

warning: use of deprecated method `rusqlite::Statement::<'_>::query_and_then_named`: You can use `query_and_then` with named params now.
   --> zcash_client_sqlite/src/wallet/transact.rs:137:35
    |
137 |     let notes = stmt_select_notes.query_and_then_named::<_, SqliteClientError, _>(
    |                                   ^^^^^^^^^^^^^^^^^^^^

Check warning on line 79 in zcash_client_sqlite/src/wallet/transact.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

use of deprecated method `rusqlite::Statement::<'_>::query_and_then_named`: You can use `query_and_then` with named params now.

warning: use of deprecated method `rusqlite::Statement::<'_>::query_and_then_named`: You can use `query_and_then` with named params now.
  --> zcash_client_sqlite/src/wallet/transact.rs:79:35
   |
79 |     let notes = stmt_select_notes.query_and_then_named::<_, SqliteClientError, _>(
   |                                   ^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

Check warning on line 662 in zcash_client_sqlite/src/wallet.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

use of deprecated method `rusqlite::Statement::<'_>::execute_named`: You can use `execute` with named params now.

warning: use of deprecated method `rusqlite::Statement::<'_>::execute_named`: You can use `execute` with named params now.
   --> zcash_client_sqlite/src/wallet.rs:662:41
    |
662 |         stmts.stmt_insert_received_note.execute_named(&sql_args)?;
    |                                         ^^^^^^^^^^^^^

Check warning on line 660 in zcash_client_sqlite/src/wallet.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

use of deprecated method `rusqlite::Statement::<'_>::execute_named`: You can use `execute` with named params now.

warning: use of deprecated method `rusqlite::Statement::<'_>::execute_named`: You can use `execute` with named params now.
   --> zcash_client_sqlite/src/wallet.rs:660:40
    |
660 |     if stmts.stmt_update_received_note.execute_named(&sql_args)? == 0 {
    |                                        ^^^^^^^^^^^^^

Check warning on line 137 in zcash_client_sqlite/src/wallet/transact.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (nightly)

use of deprecated method `rusqlite::Statement::<'_>::query_and_then_named`: You can use `query_and_then` with named params now.

warning: use of deprecated method `rusqlite::Statement::<'_>::query_and_then_named`: You can use `query_and_then` with named params now.
   --> zcash_client_sqlite/src/wallet/transact.rs:137:35
    |
137 |     let notes = stmt_select_notes.query_and_then_named::<_, SqliteClientError, _>(
    |                                   ^^^^^^^^^^^^^^^^^^^^