Skip to content

Update README and crate docs to state that this is a fork #34

Update README and crate docs to state that this is a fork

Update README and crate docs to state that this is a fork #34

GitHub Actions / Clippy (beta) failed Oct 28, 2024 in 1s

Clippy (beta)

5 errors, 85 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 5
Warning 85
Note 0
Help 0

Versions

  • rustc 1.83.0-beta.2 (88c1c3c11 2024-10-18)
  • cargo 1.83.0-beta.2 (15fbd2f60 2024-10-08)
  • clippy 0.1.83 (88c1c3c 2024-10-18)

Annotations

Check warning on line 158 in ironfish-primitives/src/legacy.rs

See this annotation in the file changed.

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

useless use of `vec!`

warning: useless use of `vec!`
   --> ironfish-primitives/src/legacy.rs:158:30
    |
158 |             let short_data = vec![2; 100];
    |                              ^^^^^^^^^^^^ help: you can use an array directly: `[2; 100]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
    = note: `-W clippy::useless-vec` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::useless_vec)]`

Check warning on line 515 in ironfish-primitives/src/zip32.rs

See this annotation in the file changed.

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

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> ironfish-primitives/src/zip32.rs:515:6
    |
515 | impl<'a> From<&'a ExtendedSpendingKey> for ExtendedFullViewingKey {
    |      ^^        ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
515 - impl<'a> From<&'a ExtendedSpendingKey> for ExtendedFullViewingKey {
515 + impl From<&ExtendedSpendingKey> for ExtendedFullViewingKey {
    |

Check warning on line 718 in ironfish-primitives/src/transaction/mod.rs

See this annotation in the file changed.

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

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> ironfish-primitives/src/transaction/mod.rs:718:18
    |
718 |             .zip(v_output_proofs.into_iter())
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `v_output_proofs`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 708 in ironfish-primitives/src/transaction/mod.rs

See this annotation in the file changed.

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

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> ironfish-primitives/src/transaction/mod.rs:708:26
    |
708 |                     .zip(v_spend_auth_sigs.into_iter()),
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `v_spend_auth_sigs`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 63 in ironfish-primitives/src/transaction/util/sha256d.rs

See this annotation in the file changed.

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

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
  --> ironfish-primitives/src/transaction/util/sha256d.rs:63:28
   |
63 |         self.hasher.update(&buf);
   |                            ^^^^ help: change this to: `buf`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 516 in ironfish-primitives/src/transaction/txid.rs

See this annotation in the file changed.

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

this expression borrows a value the compiler would automatically borrow

warning: this expression borrows a value the compiler would automatically borrow
   --> ironfish-primitives/src/transaction/txid.rs:516:9
    |
516 |         (&mut personal[..12]).copy_from_slice(ZCASH_AUTH_PERSONALIZATION_PREFIX);
    |         ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `personal[..12]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 371 in ironfish-primitives/src/transaction/txid.rs

See this annotation in the file changed.

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

this expression borrows a value the compiler would automatically borrow

warning: this expression borrows a value the compiler would automatically borrow
   --> ironfish-primitives/src/transaction/txid.rs:371:5
    |
371 |     (&mut personal[..12]).copy_from_slice(ZCASH_TX_PERSONALIZATION_PREFIX);
    |     ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `personal[..12]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 90 in ironfish-primitives/src/transaction/txid.rs

See this annotation in the file changed.

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

this expression borrows a value the compiler would automatically borrow

warning: this expression borrows a value the compiler would automatically borrow
  --> ironfish-primitives/src/transaction/txid.rs:90:9
   |
90 |         (&mut h).write_u32::<LittleEndian>(t_in.sequence).unwrap();
   |         ^^^^^^^^ help: change this to: `h`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 255 in ironfish-primitives/src/transaction/sighash_v4.rs

See this annotation in the file changed.

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

this expression borrows a value the compiler would automatically borrow

warning: this expression borrows a value the compiler would automatically borrow
   --> ironfish-primitives/src/transaction/sighash_v4.rs:255:21
    |
255 |                     (&mut data)
    |                     ^^^^^^^^^^^ help: change this to: `data`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 148 in ironfish-primitives/src/transaction/sighash_v4.rs

See this annotation in the file changed.

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

this expression borrows a value the compiler would automatically borrow

warning: this expression borrows a value the compiler would automatically borrow
   --> ironfish-primitives/src/transaction/sighash_v4.rs:148:9
    |
148 |         (&mut personal[..12]).copy_from_slice(ZCASH_SIGHASH_PERSONALIZATION_PREFIX);
    |         ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `personal[..12]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 57 in ironfish-primitives/src/transaction/sighash_v4.rs

See this annotation in the file changed.

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

this expression borrows a value the compiler would automatically borrow

warning: this expression borrows a value the compiler would automatically borrow
  --> ironfish-primitives/src/transaction/sighash_v4.rs:57:9
   |
57 |         (&mut data)
   |         ^^^^^^^^^^^ help: change this to: `data`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 80 in ironfish-primitives/src/transaction/sighash.rs

See this annotation in the file changed.

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

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
  --> ironfish-primitives/src/transaction/sighash.rs:80:5
   |
80 |     'a,
   |     ^^
...
86 |     signable_input: &SignableInput<'a>,
   |                                    ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
80 ~     TA: TransparentAuthorizingContext,
81 |     SA: sapling::Authorization<Proof = GrothProofBytes>,
...
84 |     tx: &TransactionData<A>,
85 ~     signable_input: &SignableInput<'_>,
   |

Check warning on line 41 in ironfish-primitives/src/transaction/sighash.rs

See this annotation in the file changed.

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

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
  --> ironfish-primitives/src/transaction/sighash.rs:41:6
   |
41 | impl<'a> SignableInput<'a> {
   |      ^^                ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
   |
41 - impl<'a> SignableInput<'a> {
41 + impl SignableInput<'_> {
   |

Check warning on line 157 in ironfish-primitives/src/transaction/components/tze/builder.rs

See this annotation in the file changed.

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

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> ironfish-primitives/src/transaction/components/tze/builder.rs:157:22
    |
157 |                 .zip(payloads.into_iter())
    |                      ^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `payloads`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 138 in ironfish-primitives/src/transaction/components/tze/builder.rs

See this annotation in the file changed.

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

useless conversion to the same type: `std::iter::Zip<std::vec::IntoIter<transaction::components::tze::builder::TzeSigner<'_, transaction::TransactionData<transaction::Unauthorized>>>, std::slice::Iter<'_, transaction::components::tze::TzeIn<()>>>`

warning: useless conversion to the same type: `std::iter::Zip<std::vec::IntoIter<transaction::components::tze::builder::TzeSigner<'_, transaction::TransactionData<transaction::Unauthorized>>>, std::slice::Iter<'_, transaction::components::tze::TzeIn<()>>>`
   --> ironfish-primitives/src/transaction/components/tze/builder.rs:135:24
    |
135 |           let payloads = signers
    |  ________________________^
136 | |             .into_iter()
137 | |             .zip(self.vin.iter())
138 | |             .into_iter()
    | |________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into_iter()`
    |
135 ~         let payloads = signers
136 +             .into_iter()
137 +             .zip(self.vin.iter())
    |

Check warning on line 248 in ironfish-primitives/src/transaction/components/transparent/builder.rs

See this annotation in the file changed.

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

casting to the same type is unnecessary (`u8` -> `u8`)

warning: casting to the same type is unnecessary (`u8` -> `u8`)
   --> ironfish-primitives/src/transaction/components/transparent/builder.rs:248:36
    |
248 |                 sig_bytes.extend(&[SIGHASH_ALL as u8]);
    |                                    ^^^^^^^^^^^^^^^^^ help: try: `SIGHASH_ALL`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
    = note: `-W clippy::unnecessary-cast` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_cast)]`

Check warning on line 214 in ironfish-primitives/src/transaction/components/transparent/builder.rs

See this annotation in the file changed.

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

unneeded `return` statement

warning: unneeded `return` statement
   --> ironfish-primitives/src/transaction/components/transparent/builder.rs:210:9
    |
210 | /         return self
211 | |             .inputs
212 | |             .iter()
213 | |             .map(|txin| txin.coin.script_pubkey.clone())
214 | |             .collect();
    | |______________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
210 ~         self
211 +             .inputs
212 +             .iter()
213 +             .map(|txin| txin.coin.script_pubkey.clone())
214 ~             .collect()
    |

Check warning on line 206 in ironfish-primitives/src/transaction/components/transparent/builder.rs

See this annotation in the file changed.

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

unneeded `return` statement

warning: unneeded `return` statement
   --> ironfish-primitives/src/transaction/components/transparent/builder.rs:206:9
    |
206 |         return self.inputs.iter().map(|txin| txin.coin.value).collect();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
206 -         return self.inputs.iter().map(|txin| txin.coin.value).collect();
206 +         self.inputs.iter().map(|txin| txin.coin.value).collect()
    |

Check warning on line 187 in ironfish-primitives/src/transaction/components/transparent/builder.rs

See this annotation in the file changed.

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

usage of a legacy numeric constant

warning: usage of a legacy numeric constant
   --> ironfish-primitives/src/transaction/components/transparent/builder.rs:187:23
    |
187 |             sequence: std::u32::MAX,
    |                       ^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
    |
187 |             sequence: u32::MAX,
    |                       ~~~~~~~~

Check warning on line 103 in ironfish-primitives/src/transaction/components/transparent/builder.rs

See this annotation in the file changed.

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

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> ironfish-primitives/src/transaction/components/transparent/builder.rs:103:50
    |
103 |                 if hash[..] != Ripemd160::digest(&Sha256::digest(&pubkey))[..] {
    |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `Sha256::digest(&pubkey)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
    = note: `-W clippy::needless-borrows-for-generic-args` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrows_for_generic_args)]`

Check warning on line 608 in ironfish-primitives/src/transaction/components/sapling/builder.rs

See this annotation in the file changed.

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

this let-binding has unit value

warning: this let-binding has unit value
   --> ironfish-primitives/src/transaction/components/sapling/builder.rs:608:13
    |
608 |             let mut ctx = prover.new_sapling_proving_context();
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
    = note: `-W clippy::let-unit-value` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::let_unit_value)]`
help: omit the `let` binding
    |
608 |             prover.new_sapling_proving_context();
    |
help: variable `ctx` of type `()` can be replaced with explicit `()`
    |
612 |                 &mut (),
    |                      ~~
help: variable `ctx` of type `()` can be replaced with explicit `()`
    |
620 |                 &mut (),
    |                      ~~

Check warning on line 205 in ironfish-primitives/src/transaction/components/amount.rs

See this annotation in the file changed.

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

usage of `Iterator::fold` on a type that implements `Try`

warning: usage of `Iterator::fold` on a type that implements `Try`
   --> ironfish-primitives/src/transaction/components/amount.rs:205:14
    |
205 |         iter.fold(Some(Amount::zero()), |acc, a| acc? + *a)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(Amount::zero(), |acc, a| ...)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold

Check warning on line 199 in ironfish-primitives/src/transaction/components/amount.rs

See this annotation in the file changed.

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

usage of `Iterator::fold` on a type that implements `Try`

warning: usage of `Iterator::fold` on a type that implements `Try`
   --> ironfish-primitives/src/transaction/components/amount.rs:199:14
    |
199 |         iter.fold(Some(Amount::zero()), |acc, a| acc? + a)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(Amount::zero(), |acc, a| ...)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
    = note: `-W clippy::manual-try-fold` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::manual_try_fold)]`

Check warning on line 48 in ironfish-primitives/src/transaction/components/amount.rs

See this annotation in the file changed.

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

manual `RangeInclusive::contains` implementation

warning: manual `RangeInclusive::contains` implementation
  --> ironfish-primitives/src/transaction/components/amount.rs:48:12
   |
48 |         if -MAX_MONEY <= amount && amount <= MAX_MONEY {
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-MAX_MONEY..=MAX_MONEY).contains(&amount)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
   = note: `-W clippy::manual-range-contains` implied by `-W clippy::all`
   = help: to override `-W clippy::all` add `#[allow(clippy::manual_range_contains)]`

Check warning on line 131 in ironfish-primitives/src/transaction/builder.rs

See this annotation in the file changed.

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

the following explicit lifetimes could be elided: 'a

warning: the following explicit lifetimes could be elided: 'a
   --> ironfish-primitives/src/transaction/builder.rs:131:6
    |
131 | impl<'a, P: consensus::Parameters> Builder<'a, P, OsRng> {
    |      ^^                                    ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
    |
131 - impl<'a, P: consensus::Parameters> Builder<'a, P, OsRng> {
131 + impl<P: consensus::Parameters> Builder<'_, P, OsRng> {
    |