Skip to content

remove decrypt_and_store_transaction #117

remove decrypt_and_store_transaction

remove decrypt_and_store_transaction #117

Triggered via push November 2, 2023 04:09
Status Failure
Total duration 6m 34s
Artifacts

ci.yml

on: push
Matrix: build
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

17 errors and 499 warnings
Build target wasm32-wasi
failed to select a version for the requirement `time = "^0.3.20"`
Build target wasm32-wasi
The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
Build target wasm32-unknown-unknown
The operation was canceled.
Intra-doc links
failed to select a version for the requirement `time = "^0.3.20"`
Intra-doc links
The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
Test on ubuntu-latest
Input required and not supplied: path
Rustfmt
failed to select a version for the requirement `time = "^0.3.20"`
Rustfmt
The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
Bitrot check
failed to select a version for the requirement `time = "^0.3.20"`
Bitrot check
The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
Test on macOS-latest
The operation was canceled.
Test on windows-latest
The operation was canceled.
Clippy (1.51.0)
Clippy had exited with the 101 exit code
Code coverage
Broken pipe (os error 32)
Code coverage
could not compile `bitvec` (lib) due to 2 previous errors
Code coverage
cannot find attribute `skip` in this scope
Code coverage
The process '/home/runner/.cargo/bin/cargo' failed with exit code 1
the borrowed expression implements the required traits: zcash_proofs/src/lib.rs#L163
warning: the borrowed expression implements the required traits --> zcash_proofs/src/lib.rs:163:37 | 163 | VerifyingKey::<Bls12>::read(&mut fs) | ^^^^^^^ help: change this to: `fs` | = 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)]`
this expression borrows a value the compiler would automatically borrow: zcash_proofs/src/sapling/verifier.rs#L161
warning: this expression borrows a value the compiler would automatically borrow --> zcash_proofs/src/sapling/verifier.rs:161:9 | 161 | (&mut data_to_be_signed[32..64]).copy_from_slice(&sighash_value[..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_to_be_signed[32..64]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_proofs/src/sapling/verifier.rs#L62
warning: this expression borrows a value the compiler would automatically borrow --> zcash_proofs/src/sapling/verifier.rs:62:9 | 62 | (&mut data_to_be_signed[32..64]).copy_from_slice(&sighash_value[..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_to_be_signed[32..64]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_proofs/src/sapling/prover.rs#L247
warning: this expression borrows a value the compiler would automatically borrow --> zcash_proofs/src/sapling/prover.rs:247:9 | 247 | (&mut data_to_be_signed[32..64]).copy_from_slice(&sighash[..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_to_be_signed[32..64]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
using `clone` on type `SubgroupPoint` which implements the `Copy` trait: zcash_proofs/src/sapling/prover.rs#L90
warning: using `clone` on type `SubgroupPoint` which implements the `Copy` trait --> zcash_proofs/src/sapling/prover.rs:90:23 | 90 | PublicKey(proof_generation_key.ak.clone().into()).randomize(ar, SPENDING_KEY_GENERATOR); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `proof_generation_key.ak` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `-W clippy::clone-on-copy` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::clone_on_copy)]`
used `unwrap()` on `Some` value: zcash_proofs/src/circuit/sprout/mod.rs#L460
warning: used `unwrap()` on `Some` value --> zcash_proofs/src/circuit/sprout/mod.rs:460:40 | 460 | .write_u64::<LittleEndian>(vpub_new.unwrap()) | ^^^^^^^^^^^^^^^^^ | help: remove the `Some` and `unwrap()` --> zcash_proofs/src/circuit/sprout/mod.rs:413:24 | 413 | let vpub_new = Some(test_vector.read_u64::<LittleEndian>().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_literal_unwrap
used `unwrap()` on `Some` value: zcash_proofs/src/circuit/sprout/mod.rs#L457
warning: used `unwrap()` on `Some` value --> zcash_proofs/src/circuit/sprout/mod.rs:457:40 | 457 | .write_u64::<LittleEndian>(vpub_old.unwrap()) | ^^^^^^^^^^^^^^^^^ | help: remove the `Some` and `unwrap()` --> zcash_proofs/src/circuit/sprout/mod.rs:412:24 | 412 | let vpub_old = Some(test_vector.read_u64::<LittleEndian>().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_literal_unwrap
used `unwrap()` on `Some` value: zcash_proofs/src/circuit/sprout/mod.rs#L449
warning: used `unwrap()` on `Some` value --> zcash_proofs/src/circuit/sprout/mod.rs:449:32 | 449 | expected_inputs.extend(h_sig.unwrap().to_vec()); | ^^^^^^^^^^^^^^ | help: remove the `Some` and `unwrap()` --> zcash_proofs/src/circuit/sprout/mod.rs:362:21 | 362 | let h_sig = Some(get_u256(&mut test_vector)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_literal_unwrap
used `unwrap()` on `Some` value: zcash_proofs/src/circuit/sprout/mod.rs#L448
warning: used `unwrap()` on `Some` value --> zcash_proofs/src/circuit/sprout/mod.rs:448:32 | 448 | expected_inputs.extend(rt.unwrap().to_vec()); | ^^^^^^^^^^^ | help: remove the `Some` and `unwrap()` --> zcash_proofs/src/circuit/sprout/mod.rs:361:18 | 361 | let rt = Some(get_u256(&mut test_vector)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_literal_unwrap = note: `-W clippy::unnecessary-literal-unwrap` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_literal_unwrap)]`
dereferencing a tuple pattern where every element takes a reference: zcash_proofs/src/circuit/sprout/input.rs#L69
warning: dereferencing a tuple pattern where every element takes a reference --> zcash_proofs/src/circuit/sprout/input.rs:69:37 | 69 | layer.as_ref().map(|&(ref sibling, _)| &sibling[..]), | ^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference = note: `-W clippy::needless-borrowed-reference` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrowed_reference)]` help: try removing the `&` and `ref` parts | 69 - layer.as_ref().map(|&(ref sibling, _)| &sibling[..]), 69 + layer.as_ref().map(|(sibling, _)| &sibling[..]), |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_proofs/src/circuit/sapling.rs#L740
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_proofs/src/circuit/sapling.rs:740:45 | 740 | bls12_381::Scalar::from_str(&expected_commitment_vs[i as usize]).unwrap() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `expected_commitment_vs[i as usize]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_proofs/src/circuit/sapling.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_proofs/src/circuit/sapling.rs:736:45 | 736 | bls12_381::Scalar::from_str(&expected_commitment_us[i as usize]).unwrap() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `expected_commitment_us[i as usize]` | = 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)]`
useless use of `vec!`: zcash_proofs/src/circuit/sapling.rs#L683
warning: useless use of `vec!` --> zcash_proofs/src/circuit/sapling.rs:683:34 | 683 | let expected_commitment_vs = vec![ | __________________________________^ 684 | | "27630722367128086497290371604583225252915685718989450292520883698391703910", 685 | | "23310648738313092772044712773481584369462075017189681529702825235349449805260", 686 | | "25709635353183537915646348052945798827495141780341329896098121888376871589480", ... | 693 | | "32959334601512756708397683646222389414681003290313255304927423560477040775488", 694 | | ]; | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec help: you can use an array directly | 683 ~ let expected_commitment_vs = ["27630722367128086497290371604583225252915685718989450292520883698391703910", 684 + "23310648738313092772044712773481584369462075017189681529702825235349449805260", 685 + "25709635353183537915646348052945798827495141780341329896098121888376871589480", 686 + "10516315852014492141081718791576479298042117442649432716255936672048164184691", 687 + "23970713991179488695004801139667700217127937225554773561645815034212389459772", 688 + "3256052161046564597126736968199320852691566092694819239485673781545479548450", 689 + "18887250722195819674378865377623103071236046274361890247643850134985809137409", 690 + "36501156873031641173054592888886902104303750771545647842488588827138867116570", 691 + "21927526310070011864833939629345235038589128172309792087590183778192091594775", 692 ~ "32959334601512756708397683646222389414681003290313255304927423560477040775488"]; |
useless use of `vec!`: zcash_proofs/src/circuit/sapling.rs#L670
warning: useless use of `vec!` --> zcash_proofs/src/circuit/sapling.rs:670:34 | 670 | let expected_commitment_us = vec![ | __________________________________^ 671 | | "43821661663052659750276289184181083197337192946256245809816728673021647664276", 672 | | "7220807656052227578299730541645543434083158611414003423211850718229633594616", 673 | | "13239753550660714843257636471668037031928211668773449453628093339627668081697", ... | 680 | | "18269767207277008186871145355531741929166733260352590789136389380124992250945", 681 | | ]; | |_____^ | = 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)]` help: you can use an array directly | 670 ~ let expected_commitment_us = ["43821661663052659750276289184181083197337192946256245809816728673021647664276", 671 + "7220807656052227578299730541645543434083158611414003423211850718229633594616", 672 + "13239753550660714843257636471668037031928211668773449453628093339627668081697", 673 + "10900524635678389360790699587556574797582192824300145558807405770494079767974", 674 + "1411013767457690636461779630023011774660680126764323588543800715293173598850", 675 + "32334206652383066267661379202183359608706535021387905923603014648832344657662", 676 + "20206750741605167608500278423400565295188703622528437817438897624149653579380", 677 + "46716485782200334735478719487356079850582051575003452698983255860512578229998", 678 + "31221372899739042781372142393132358519434268512685538373976981051223051220367", 679 ~ "18269767207277008186871145355531741929166733260352590789136389380124992250945"]; |
accessing first element with `chunk.get(0)`: zcash_proofs/src/circuit/ecc.rs#L39
warning: accessing first element with `chunk.get(0)` --> zcash_proofs/src/circuit/ecc.rs:39:23 | 39 | let chunk_a = chunk | _______________________^ 40 | | .get(0) | |___________________^ help: try: `chunk.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first = note: `-W clippy::get-first` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::get_first)]`
this expression creates a reference which is immediately dereferenced by the compiler: components/equihash/src/verify.rs#L495
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/equihash/src/verify.rs:495:77 | 495 | is_valid_solution_recursive(tv.params, tv.input, &tv.nonce, &tv.solution) | ^^^^^^^^^^^^ help: change this to: `tv.solution` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/equihash/src/verify.rs#L489
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/equihash/src/verify.rs:489:77 | 489 | is_valid_solution_iterative(tv.params, tv.input, &tv.nonce, &tv.solution) | ^^^^^^^^^^^^ help: change this to: `tv.solution` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/equihash/src/verify.rs#L317
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/equihash/src/verify.rs:317:26 | 317 | Ok(Node::new(&p, &state, indices[0])) | ^^^^^^ help: change this to: `state` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/equihash/src/verify.rs#L317
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/equihash/src/verify.rs:317:22 | 317 | Ok(Node::new(&p, &state, indices[0])) | ^^ help: change this to: `p` | = 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)]`
usage of `mem::size_of::<T>()` to obtain the size of `T` in bits: components/equihash/src/verify.rs#L224
warning: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits --> components/equihash/src/verify.rs:224:23 | 224 | let len_indices = 8 * size_of::<u32>() * minimal.len() / (c_bit_len + 1); | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u32::BITS as usize` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits
usage of `mem::size_of::<T>()` to obtain the size of `T` in bits: components/equihash/src/verify.rs#L173
warning: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits --> components/equihash/src/verify.rs:173:13 | 173 | assert!(8 * size_of::<u32>() >= 7 + bit_len); | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u32::BITS as usize` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits = note: `-W clippy::manual-bits` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::manual_bits)]`
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L461
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:461:31 | 461 | .open_to(&mut op, &out_ciphertext, &[], ock.as_ref(), &[0u8; 12]) | ^^^^^^^^^^^^^^^ help: change this to: `out_ciphertext` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L423
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:423:41 | 423 | let shared_secret = D::ka_agree_dec(&ivk, output.epk()); | ^^^^ help: change this to: `ivk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L392
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:392:57 | 392 | if D::epk_bytes(&D::ka_derive_public(&note, &derived_esk)) | ^^^^^^^^^^^^ help: change this to: `derived_esk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L392
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:392:50 | 392 | if D::epk_bytes(&D::ka_derive_public(&note, &derived_esk)) | ^^^^^ help: change this to: `note` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L391
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:391:28 | 391 | D::check_epk_bytes(&note, |derived_esk| { | ^^^^^ help: change this to: `note` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L387
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:387:56 | 387 | if D::ExtractedCommitmentBytes::try_from(D::cmstar(&note)) | ^^^^^ help: change this to: `note` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L373
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:373:72 | 373 | let (note, to) = domain.parse_note_plaintext_without_memo_ivk(ivk, &plaintext)?; | ^^^^^^^^^^ help: change this to: `plaintext` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L295
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:295:47 | 295 | let ock = D::derive_ock(ovk, &cv, &cmstar, &D::epk_bytes(&self.epk)); | ^^^^^^^ help: change this to: `cmstar` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L295
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:295:42 | 295 | let ock = D::derive_ock(ovk, &cv, &cmstar, &D::epk_bytes(&self.epk)); | ^^^ help: change this to: `cv` | = 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)]`
the following explicit lifetimes could be elided: 'a: zcash_extensions/src/transparent/demo.rs#L102
warning: the following explicit lifetimes could be elided: 'a --> zcash_extensions/src/transparent/demo.rs:102:12 | 102 | fn fmt<'a>(&self, f: &mut fmt::Formatter<'a>) -> fmt::Result { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 102 - fn fmt<'a>(&self, f: &mut fmt::Formatter<'a>) -> fmt::Result { 102 + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
the following explicit lifetimes could be elided: 'a: zcash_extensions/src/consensus/transparent.rs#L98
warning: the following explicit lifetimes could be elided: 'a --> zcash_extensions/src/consensus/transparent.rs:98:15 | 98 | fn verify<'a>( | ^^ ... 102 | ctx: &Context<'a>, | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 98 ~ fn verify( 99 | &self, 100 | precondition: &Precondition, 101 | witness: &Witness, 102 ~ ctx: &Context<'_>, |
the following explicit lifetimes could be elided: 'a: zcash_extensions/src/consensus/transparent.rs#L67
warning: the following explicit lifetimes could be elided: 'a --> zcash_extensions/src/consensus/transparent.rs:67:15 | 67 | fn verify<'a>( | ^^ ... 71 | ctx: &Context<'a>, | ^^ | = 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 | 67 ~ fn verify( 68 | &self, 69 | precondition: &Precondition, 70 | witness: &Witness, 71 ~ ctx: &Context<'_>, |
the following explicit lifetimes could be elided: 'a: zcash_extensions/src/transparent/demo.rs#L102
warning: the following explicit lifetimes could be elided: 'a --> zcash_extensions/src/transparent/demo.rs:102:12 | 102 | fn fmt<'a>(&self, f: &mut fmt::Formatter<'a>) -> fmt::Result { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 102 - fn fmt<'a>(&self, f: &mut fmt::Formatter<'a>) -> fmt::Result { 102 + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
the following explicit lifetimes could be elided: 'a: zcash_extensions/src/consensus/transparent.rs#L98
warning: the following explicit lifetimes could be elided: 'a --> zcash_extensions/src/consensus/transparent.rs:98:15 | 98 | fn verify<'a>( | ^^ ... 102 | ctx: &Context<'a>, | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 98 ~ fn verify( 99 | &self, 100 | precondition: &Precondition, 101 | witness: &Witness, 102 ~ ctx: &Context<'_>, |
the following explicit lifetimes could be elided: 'a: zcash_extensions/src/consensus/transparent.rs#L67
warning: the following explicit lifetimes could be elided: 'a --> zcash_extensions/src/consensus/transparent.rs:67:15 | 67 | fn verify<'a>( | ^^ ... 71 | ctx: &Context<'a>, | ^^ | = 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 | 67 ~ fn verify( 68 | &self, 69 | precondition: &Precondition, 70 | witness: &Witness, 71 ~ ctx: &Context<'_>, |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_extras/src/wallet.rs#L188
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_extras/src/wallet.rs:188:77 | 188 | RecipientAddress::Transparent(to) => builder.add_transparent_output(&to, value), | ^^^ help: change this to: `to` | = 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)]`
unused imports: `ReceivedTransaction`, `decrypt_transaction`: zcash_extras/src/wallet.rs#L19
warning: unused imports: `ReceivedTransaction`, `decrypt_transaction` --> zcash_extras/src/wallet.rs:19:30 | 19 | data_api::{error::Error, ReceivedTransaction, SentTransaction}, | ^^^^^^^^^^^^^^^^^^^ 20 | decrypt_transaction, | ^^^^^^^^^^^^^^^^^^^
unused imports: `NetworkUpgrade`, `Transaction`: zcash_extras/src/wallet.rs#L5
warning: unused imports: `NetworkUpgrade`, `Transaction` --> zcash_extras/src/wallet.rs:5:33 | 5 | consensus::{self, BranchId, NetworkUpgrade}, | ^^^^^^^^^^^^^^ ... 11 | Transaction, | ^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/extensions/transparent.rs#L150
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/extensions/transparent.rs:150:13 | 150 | &context, | ^^^^^^^^ help: change this to: `context` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
accessing first element with `peaks.get(0)`: zcash_history/src/tree.rs#L248
warning: accessing first element with `peaks.get(0)` --> zcash_history/src/tree.rs:248:29 | 248 | let mut new_root = *peaks.get(0).expect("At lest 1 elements in peaks"); | ^^^^^^^^^^^^ help: try: `peaks.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first = note: `-W clippy::get-first` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::get_first)]`
the borrowed expression implements the required traits: zcash_history/src/node_data.rs#L239
warning: the borrowed expression implements the required traits --> zcash_history/src/node_data.rs:239:59 | 239 | TestResult::from_bool(NodeData::from_bytes(0, &node_data.to_bytes()).unwrap() == node_data) | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `node_data.to_bytes()` | = 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)]`
methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value: zcash_primitives/src/zip32.rs#L87
warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value --> zcash_primitives/src/zip32.rs:87:17 | 87 | fn to_index(&self) -> u32 { | ^^^^^ | = help: consider choosing a less ambiguous name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention = note: `-W clippy::wrong-self-convention` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::wrong_self_convention)]`
the borrowed expression implements the required traits: zcash_history/examples/write.rs#L35
warning: the borrowed expression implements the required traits --> zcash_history/examples/write.rs:35:46 | 35 | let mut file = std::fs::File::create(&out_file_path).expect("Failed to create output file"); | ^^^^^^^^^^^^^^ help: change this to: `out_file_path` | = 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)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/lib.rs#L477
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/lib.rs#L415
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/lib.rs#L410
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
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/wallet.rs#L822
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/wallet.rs:822:20 | 822 | assert_eq!((&db_data).get_target_and_anchor_heights().unwrap(), None); | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L765
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L718
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L680
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>, |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/wallet.rs#L662
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/wallet.rs#L660
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
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L631
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L616
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L578
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L551
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L529
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>, |
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/wallet/transact.rs#L693
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/wallet/transact.rs:693:34 | 693 | let (_, anchor_height) = (&db_data).get_target_and_anchor_heights().unwrap().unwrap(); | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/wallet/transact.rs#L358
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/wallet/transact.rs:358:35 | 358 | let (_, anchor_height2) = (&db_data).get_target_and_anchor_heights().unwrap().unwrap(); | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/wallet/transact.rs#L340
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/wallet/transact.rs:340:34 | 340 | let (_, anchor_height) = (&db_data).get_target_and_anchor_heights().unwrap().unwrap(); | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/for_async/mod.rs#L363
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/for_async/mod.rs#L350
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/for_async/mod.rs#L338
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
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L314
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:314:13 | 314 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L290
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:290:13 | 290 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L242
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:242:13 | 242 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L218
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:218:13 | 218 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L174
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:174:13 | 174 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L163
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:163:13 | 163 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L146
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:146:13 | 146 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L134
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:134:13 | 134 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L117
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:117:13 | 117 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = 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)]`
useless use of `vec!`: zcash_primitives/src/transaction/tests.rs#L96
warning: useless use of `vec!` --> zcash_primitives/src/transaction/tests.rs:96:21 | 96 | let txn_bytes = vec![ | _____________________^ 97 | | 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x01, 0x52, 0x52, 0x52, 0x52, 98 | | 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 99 | | 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x00, 0x00, ... | 106 | | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 107 | | ]; | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec help: you can use an array directly | 96 ~ let txn_bytes = [0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x01, 0x52, 0x52, 0x52, 0x52, 97 + 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 98 + 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x00, 0x00, 99 + 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 100 + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 101 + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x30, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 102 + 0x00, 0x00, 0x01, 0x20, 0xd9, 0x81, 0x80, 0x87, 0xde, 0x72, 0x44, 0xab, 0xc1, 0xb5, 0xfc, 103 + 0xf2, 0x8e, 0x55, 0xe4, 0x2c, 0x7f, 0xf9, 0xc6, 0x78, 0xc0, 0x60, 0x51, 0x81, 0xf3, 0x7a, 104 + 0xc5, 0xd7, 0x41, 0x4a, 0x7b, 0x95, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 105 ~ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; |
the borrowed expression implements the required traits: zcash_primitives/src/transaction/util/sha256d.rs#L59
warning: the borrowed expression implements the required traits --> zcash_primitives/src/transaction/util/sha256d.rs:59:28 | 59 | 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 = 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)]`
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/transaction/sighash.rs#L336
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/transaction/sighash.rs:336:17 | 336 | (&mut data) | ^^^^^^^^^^^ help: change this to: `data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/transaction/sighash.rs#L238
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/transaction/sighash.rs:238:9 | 238 | (&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
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/transaction/sighash.rs#L93
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/transaction/sighash.rs:93:9 | 93 | (&mut data) | ^^^^^^^^^^^ help: change this to: `data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
name `PHGR` contains a capitalized acronym: zcash_primitives/src/transaction/components/sprout.rs#L17
warning: name `PHGR` contains a capitalized acronym --> zcash_primitives/src/transaction/components/sprout.rs:17:5 | 17 | PHGR([u8; PHGR_PROOF_SIZE]), | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Phgr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms = note: `-W clippy::upper-case-acronyms` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::upper_case_acronyms)]`
manual `RangeInclusive::contains` implementation: zcash_primitives/src/transaction/components/amount.rs#L33
warning: manual `RangeInclusive::contains` implementation --> zcash_primitives/src/transaction/components/amount.rs:33:12 | 33 | 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)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/transaction/builder.rs#L323
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/transaction/builder.rs:323:50 | 323 | builder: Box::new(move |ctx| builder(&ctx).map(|x| x.to_payload())), | ^^^^ help: change this to: `ctx` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
use of deprecated method `rusqlite::Statement::<'_>::execute_named`: You can use `execute` with named params now.: zcash_client_sqlite/src/wallet.rs#L662
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)?; | ^^^^^^^^^^^^^
use of deprecated method `rusqlite::Statement::<'_>::execute_named`: You can use `execute` with named params now.: zcash_client_sqlite/src/wallet.rs#L660
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 { | ^^^^^^^^^^^^^
use of `default` to create a unit struct: zcash_primitives/src/transaction/builder.rs#L146
warning: use of `default` to create a unit struct --> zcash_primitives/src/transaction/builder.rs:146:33 | 146 | _params: PhantomData::default(), | ^^^^^^^^^^^ help: remove this call to `default` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs = note: `-W clippy::default-constructed-unit-structs` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::default_constructed_unit_structs)]`
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#L137
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, _>( | ^^^^^^^^^^^^^^^^^^^^
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#L79
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
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/sapling.rs#L404
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/sapling.rs:404:9 | 404 | (&mut note_contents) | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `note_contents` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/sapling.rs#L153
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/sapling.rs:153:5 | 153 | (&mut data_to_be_signed[32..64]).copy_from_slice(&sighash[..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_to_be_signed[32..64]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the following explicit lifetimes could be elided: 'a: zcash_primitives/src/sapling/redjubjub.rs#L160
warning: the following explicit lifetimes could be elided: 'a --> zcash_primitives/src/sapling/redjubjub.rs:160:21 | 160 | pub fn batch_verify<'a, R: RngCore>( | ^^ 161 | mut rng: &mut R, 162 | batch: &[BatchEntry<'a>], | ^^ | = 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 | 160 ~ pub fn batch_verify<R: RngCore>( 161 | mut rng: &mut R, 162 ~ batch: &[BatchEntry<'_>], |
using `clone` on type `SubgroupPoint` which implements the `Copy` trait: zcash_primitives/src/sapling/prover.rs#L109
warning: using `clone` on type `SubgroupPoint` which implements the `Copy` trait --> zcash_primitives/src/sapling/prover.rs:109:32 | 109 | let rk = PublicKey(proof_generation_key.ak.clone().into()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `proof_generation_key.ak` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `-W clippy::clone-on-copy` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::clone_on_copy)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/pedersen_hash.rs#L90
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/pedersen_hash.rs:90:13 | 90 | &generators.next().expect("we don't have enough generators"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `generators.next().expect("we don't have enough generators")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: zcash_primitives/src/sapling/pedersen_hash.rs#L41
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> zcash_primitives/src/sapling/pedersen_hash.rs:41:16 | 41 | .chain(bits.into_iter()); | ^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `bits` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/75b064d26970ca8e7a487072f51835ebb057d575/library/core/src/iter/traits/iterator.rs:524:12 = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `-W clippy::useless-conversion` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::useless_conversion)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L911
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:911:64 | 911 | let i10r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_10); | ^^^^^^^^^^^ help: change this to: `invalid_10` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L905
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:905:63 | 905 | let i9r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_9); | ^^^^^^^^^^ help: change this to: `invalid_9` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L900
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:900:63 | 900 | let i8r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_8); | ^^^^^^^^^^ help: change this to: `invalid_8` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L894
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:894:64 | 894 | let i7ar = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_7a); | ^^^^^^^^^^^ help: change this to: `invalid_7a` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L888
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:888:63 | 888 | let i7r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_7); | ^^^^^^^^^^ help: change this to: `invalid_7` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L882
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:882:63 | 882 | let i6r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_6); | ^^^^^^^^^^ help: change this to: `invalid_6` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L877
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:877:63 | 877 | let i5r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_5); | ^^^^^^^^^^ help: change this to: `invalid_5` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L871
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:871:63 | 871 | let i4r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_4); | ^^^^^^^^^^ help: change this to: `invalid_4` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L865
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:865:63 | 865 | let i3r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_3); | ^^^^^^^^^^ help: change this to: `invalid_3` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L860
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:860:63 | 860 | let i2r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_2); | ^^^^^^^^^^ help: change this to: `invalid_2` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L855
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:855:63 | 855 | let i1r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_1); | ^^^^^^^^^^ help: change this to: `invalid_1` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
accessing first element with `v4r.payments.get(0)`: zcash_client_backend/src/zip321.rs#L846
warning: accessing first element with `v4r.payments.get(0)` --> zcash_client_backend/src/zip321.rs:846:13 | 846 | v4r.payments.get(0).map(|p| p.amount), | ^^^^^^^^^^^^^^^^^^^ help: try: `v4r.payments.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L844
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:844:63 | 844 | let v4r = TransactionRequest::from_uri(&TEST_NETWORK, &valid_4).unwrap(); | ^^^^^^^^ help: change this to: `valid_4` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
accessing first element with `v3r.payments.get(0)`: zcash_client_backend/src/zip321.rs#L837
warning: accessing first element with `v3r.payments.get(0)` --> zcash_client_backend/src/zip321.rs:837:13 | 837 | v3r.payments.get(0).map(|p| p.amount), | ^^^^^^^^^^^^^^^^^^^ help: try: `v3r.payments.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L835
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:835:63 | 835 | let v3r = TransactionRequest::from_uri(&TEST_NETWORK, &valid_3).unwrap(); | ^^^^^^^^ help: change this to: `valid_3` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
accessing first element with `v2r.payments.get(0)`: zcash_client_backend/src/zip321.rs#L824
warning: accessing first element with `v2r.payments.get(0)` --> zcash_client_backend/src/zip321.rs:824:13 | 824 | v2r.payments.get(0).map(|p| p.amount), | ^^^^^^^^^^^^^^^^^^^ help: try: `v2r.payments.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L821
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:821:67 | 821 | let mut v2r = TransactionRequest::from_uri(&TEST_NETWORK, &valid_2).unwrap(); | ^^^^^^^^ help: change this to: `valid_2` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
accessing first element with `v1r.payments.get(0)`: zcash_client_backend/src/zip321.rs#L816
warning: accessing first element with `v1r.payments.get(0)` --> zcash_client_backend/src/zip321.rs:816:13 | 816 | v1r.payments.get(0).map(|p| p.amount), | ^^^^^^^^^^^^^^^^^^^ help: try: `v1r.payments.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first = note: `-W clippy::get-first` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::get_first)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L814
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:814:63 | 814 | let v1r = TransactionRequest::from_uri(&TEST_NETWORK, &valid_1).unwrap(); | ^^^^^^^^ help: change this to: `valid_1` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L761
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:761:90 | 761 | ...ent_address(&TEST_NETWORK.hrp_sapling_payment_address(), "ztestsapling1n65uaftvs2g7075q2x2a04shfk066u3lldzxsrprfrqtzxnhc9ps73v4lhx4l9y... | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `TEST_NETWORK.hrp_sapling_payment_address()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L756
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:756:72 | 756 | let parse_result = TransactionRequest::from_uri(&TEST_NETWORK, &uri).unwrap(); | ^^^^ help: change this to: `uri` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the following explicit lifetimes could be elided: 'a: zcash_client_backend/src/zip321.rs#L562
warning: the following explicit lifetimes could be elided: 'a --> zcash_client_backend/src/zip321.rs:562:25 | 562 | fn to_indexed_param<'a, P: consensus::Parameters>( | ^^ 563 | params: &'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 | 562 ~ fn to_indexed_param<P: consensus::Parameters>( 563 ~ params: &P, |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L584
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:584:59 | 584 | .seal_to(enc_ciphertext, &plaintext, &[], &key.as_bytes(), &[0u8; 12]) | ^^^^^^^^^^^^^^^ help: change this to: `key.as_bytes()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L565
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:565:57 | 565 | let key = kdf_sapling(shared_secret, &epk_bytes(&epk)); | ^^^^ help: change this to: `epk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L550
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:550:38 | 550 | let ock = prf_ock(&ovk, &cv, &cmu, &epk_bytes(epk)); | ^^^^ help: change this to: `cmu` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L550
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:550:33 | 550 | let ock = prf_ock(&ovk, &cv, &cmu, &epk_bytes(epk)); | ^^^ help: change this to: `cv` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L550
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:550:27 | 550 | let ock = prf_ock(&ovk, &cv, &cmu, &epk_bytes(epk)); | ^^^^ help: change this to: `ovk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L233
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:233:51 | 233 | if parse::has_duplicate_param(&current, &p.param) { | ^^^^^^^^ help: change this to: `current` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L414
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:414:13 | 414 | &ovk, | ^^^^ help: change this to: `ovk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L195
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:195:51 | 195 | ... .chain(payment_params(&payment, Some(i))) | ^^^^^^^^ help: change this to: `payment` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L262
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:262:51 | 262 | sapling_parse_note_plaintext_without_memo(&self, plaintext, |diversifier| { | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L250
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:250:51 | 250 | sapling_parse_note_plaintext_without_memo(&self, plaintext, |diversifier| { | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L176
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:176:51 | 176 | let query_params = payment_params(&payment, None) | ^^^^^^^^ help: change this to: `payment` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L169
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:169:76 | 169 | .map(move |(name, value)| render::str_param(&name, &value, payment_index)), | ^^^^^^ help: change this to: `value` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L169
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:169:69 | 169 | .map(move |(name, value)| render::str_param(&name, &value, payment_index)), | ^^^^^ help: change this to: `name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L163
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:163:63 | 163 | .map(|m| render::str_param("message", &m, payment_index)), | ^^ help: change this to: `m` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L157
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:157:61 | 157 | .map(|m| render::str_param("label", &m, payment_index)), | ^^ help: change this to: `m` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L151
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:151:53 | 151 | .map(|m| render::memo_param(&m, payment_index)), | ^^ help: change this to: `m` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/welding_rig.rs#L70
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/welding_rig.rs:70:54 | 70 | let is_change = spent_from_accounts.contains(&account); | ^^^^^^^^ help: change this to: `account` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this `impl` can be derived: zcash_client_backend/src/wallet.rs#L18
warning: this `impl` can be derived --> zcash_client_backend/src/wallet.rs:18:1 | 18 | / impl Default for AccountId { 19 | | fn default() -> Self { 20 | | AccountId(0) 21 | | } 22 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `-W clippy::derivable-impls` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::derivable_impls)]` = help: remove the manual implementation... help: ...and instead derive it | 16 + #[derive(Default)] 17 | pub struct AccountId(pub u32); |
this `impl` can be derived: zcash_primitives/src/memo.rs#L175
warning: this `impl` can be derived --> zcash_primitives/src/memo.rs:175:1 | 175 | / impl Default for Memo { 176 | | fn default() -> Self { 177 | | Memo::Empty 178 | | } 179 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `-W clippy::derivable-impls` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::derivable_impls)]` = help: remove the manual implementation... help: ...and instead derive it... | 149 + #[derive(Default)] 150 | pub enum Memo { | help: ...and mark the default variant | 151 ~ #[default] 152 ~ Empty, |
useless use of `vec!`: zcash_primitives/src/legacy.rs#L159
warning: useless use of `vec!` --> zcash_primitives/src/legacy.rs:159:30 | 159 | 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)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/keys.rs#L27
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/keys.rs:27:38 | 27 | &ExtendedSpendingKey::master(&seed), | ^^^^^ help: change this to: `seed` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
redundant closure: zcash_client_backend/src/encoding.rs#L33
warning: redundant closure --> zcash_client_backend/src/encoding.rs:33:47 | 33 | Vec::<u8>::from_base32(&data).map(|data| read(data)) | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `read` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `-W clippy::redundant-closure` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::redundant_closure)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/data_api/wallet.rs#L225
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/data_api/wallet.rs:225:77 | 225 | RecipientAddress::Transparent(to) => builder.add_transparent_output(&to, value), | ^^^ help: change this to: `to` | = 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)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/block.rs#L33
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/block.rs:33:30 | 33 | hash.copy_from_slice(&bytes); | ^^^^^^ help: change this to: `bytes` | = 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)]`
fields `p_enc` and `op` are never read: zcash_primitives/src/test_vectors/note_encryption.rs#L15
warning: fields `p_enc` and `op` are never read --> zcash_primitives/src/test_vectors/note_encryption.rs:15:9 | 1 | pub(crate) struct TestVector { | ---------- fields in this struct ... 15 | pub p_enc: [u8; 564], | ^^^^^ ... 18 | pub op: [u8; 64], | ^^ | = note: `#[warn(dead_code)]` on by default
variable does not need to be mutable: zcash_primitives/src/transaction/builder.rs#L850
warning: variable does not need to be mutable --> zcash_primitives/src/transaction/builder.rs:850:17 | 850 | let mut current = self.mtx.tze_inputs.get_mut(i).unwrap(); | ----^^^^^^^ | | | help: remove this `mut` | = note: `#[warn(unused_mut)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/lib.rs#L477
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/lib.rs#L415
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/lib.rs#L410
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
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L765
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L718
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L680
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>, |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/wallet.rs#L662
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/wallet.rs#L660
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
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L631
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L616
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L578
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L551
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L529
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>, |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/for_async/mod.rs#L363
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/for_async/mod.rs#L350
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/for_async/mod.rs#L338
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)]`
use of deprecated method `rusqlite::Statement::<'_>::execute_named`: You can use `execute` with named params now.: zcash_client_sqlite/src/wallet.rs#L662
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)?; | ^^^^^^^^^^^^^
use of deprecated method `rusqlite::Statement::<'_>::execute_named`: You can use `execute` with named params now.: zcash_client_sqlite/src/wallet.rs#L660
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 { | ^^^^^^^^^^^^^
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#L137
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, _>( | ^^^^^^^^^^^^^^^^^^^^
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#L79
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
accessing first element with `peaks.get(0)`: zcash_history/src/tree.rs#L248
warning: accessing first element with `peaks.get(0)` --> zcash_history/src/tree.rs:248:29 | 248 | let mut new_root = *peaks.get(0).expect("At lest 1 elements in peaks"); | ^^^^^^^^^^^^ help: try: `peaks.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first = note: `-W clippy::get-first` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::get_first)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_extras/src/wallet.rs#L188
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_extras/src/wallet.rs:188:77 | 188 | RecipientAddress::Transparent(to) => builder.add_transparent_output(&to, value), | ^^^ help: change this to: `to` | = 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)]`
unused imports: `ReceivedTransaction`, `decrypt_transaction`: zcash_extras/src/wallet.rs#L19
warning: unused imports: `ReceivedTransaction`, `decrypt_transaction` --> zcash_extras/src/wallet.rs:19:30 | 19 | data_api::{error::Error, ReceivedTransaction, SentTransaction}, | ^^^^^^^^^^^^^^^^^^^ 20 | decrypt_transaction, | ^^^^^^^^^^^^^^^^^^^
unused imports: `NetworkUpgrade`, `Transaction`: zcash_extras/src/wallet.rs#L5
warning: unused imports: `NetworkUpgrade`, `Transaction` --> zcash_extras/src/wallet.rs:5:33 | 5 | consensus::{self, BranchId, NetworkUpgrade}, | ^^^^^^^^^^^^^^ ... 11 | Transaction, | ^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
the following explicit lifetimes could be elided: 'a: zcash_client_backend/src/zip321.rs#L562
warning: the following explicit lifetimes could be elided: 'a --> zcash_client_backend/src/zip321.rs:562:25 | 562 | fn to_indexed_param<'a, P: consensus::Parameters>( | ^^ 563 | params: &'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 | 562 ~ fn to_indexed_param<P: consensus::Parameters>( 563 ~ params: &P, |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L233
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:233:51 | 233 | if parse::has_duplicate_param(&current, &p.param) { | ^^^^^^^^ help: change this to: `current` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L195
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:195:51 | 195 | ... .chain(payment_params(&payment, Some(i))) | ^^^^^^^^ help: change this to: `payment` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L176
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:176:51 | 176 | let query_params = payment_params(&payment, None) | ^^^^^^^^ help: change this to: `payment` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L169
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:169:76 | 169 | .map(move |(name, value)| render::str_param(&name, &value, payment_index)), | ^^^^^^ help: change this to: `value` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L169
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:169:69 | 169 | .map(move |(name, value)| render::str_param(&name, &value, payment_index)), | ^^^^^ help: change this to: `name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L163
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:163:63 | 163 | .map(|m| render::str_param("message", &m, payment_index)), | ^^ help: change this to: `m` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L157
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:157:61 | 157 | .map(|m| render::str_param("label", &m, payment_index)), | ^^ help: change this to: `m` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L151
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:151:53 | 151 | .map(|m| render::memo_param(&m, payment_index)), | ^^ help: change this to: `m` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/welding_rig.rs#L70
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/welding_rig.rs:70:54 | 70 | let is_change = spent_from_accounts.contains(&account); | ^^^^^^^^ help: change this to: `account` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this `impl` can be derived: zcash_client_backend/src/wallet.rs#L18
warning: this `impl` can be derived --> zcash_client_backend/src/wallet.rs:18:1 | 18 | / impl Default for AccountId { 19 | | fn default() -> Self { 20 | | AccountId(0) 21 | | } 22 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `-W clippy::derivable-impls` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::derivable_impls)]` = help: remove the manual implementation... help: ...and instead derive it | 16 + #[derive(Default)] 17 | pub struct AccountId(pub u32); |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/keys.rs#L27
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/keys.rs:27:38 | 27 | &ExtendedSpendingKey::master(&seed), | ^^^^^ help: change this to: `seed` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
redundant closure: zcash_client_backend/src/encoding.rs#L33
warning: redundant closure --> zcash_client_backend/src/encoding.rs:33:47 | 33 | Vec::<u8>::from_base32(&data).map(|data| read(data)) | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `read` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `-W clippy::redundant-closure` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::redundant_closure)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/data_api/wallet.rs#L225
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/data_api/wallet.rs:225:77 | 225 | RecipientAddress::Transparent(to) => builder.add_transparent_output(&to, value), | ^^^ help: change this to: `to` | = 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)]`
the borrowed expression implements the required traits: zcash_proofs/src/lib.rs#L163
warning: the borrowed expression implements the required traits --> zcash_proofs/src/lib.rs:163:37 | 163 | VerifyingKey::<Bls12>::read(&mut fs) | ^^^^^^^ help: change this to: `fs` | = 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)]`
this expression borrows a value the compiler would automatically borrow: zcash_proofs/src/sapling/verifier.rs#L161
warning: this expression borrows a value the compiler would automatically borrow --> zcash_proofs/src/sapling/verifier.rs:161:9 | 161 | (&mut data_to_be_signed[32..64]).copy_from_slice(&sighash_value[..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_to_be_signed[32..64]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_proofs/src/sapling/verifier.rs#L62
warning: this expression borrows a value the compiler would automatically borrow --> zcash_proofs/src/sapling/verifier.rs:62:9 | 62 | (&mut data_to_be_signed[32..64]).copy_from_slice(&sighash_value[..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_to_be_signed[32..64]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_proofs/src/sapling/prover.rs#L247
warning: this expression borrows a value the compiler would automatically borrow --> zcash_proofs/src/sapling/prover.rs:247:9 | 247 | (&mut data_to_be_signed[32..64]).copy_from_slice(&sighash[..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_to_be_signed[32..64]` | = 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)]`
using `clone` on type `SubgroupPoint` which implements the `Copy` trait: zcash_proofs/src/sapling/prover.rs#L90
warning: using `clone` on type `SubgroupPoint` which implements the `Copy` trait --> zcash_proofs/src/sapling/prover.rs:90:23 | 90 | PublicKey(proof_generation_key.ak.clone().into()).randomize(ar, SPENDING_KEY_GENERATOR); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `proof_generation_key.ak` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `-W clippy::clone-on-copy` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::clone_on_copy)]`
dereferencing a tuple pattern where every element takes a reference: zcash_proofs/src/circuit/sprout/input.rs#L69
warning: dereferencing a tuple pattern where every element takes a reference --> zcash_proofs/src/circuit/sprout/input.rs:69:37 | 69 | layer.as_ref().map(|&(ref sibling, _)| &sibling[..]), | ^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference = note: `-W clippy::needless-borrowed-reference` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrowed_reference)]` help: try removing the `&` and `ref` parts | 69 - layer.as_ref().map(|&(ref sibling, _)| &sibling[..]), 69 + layer.as_ref().map(|(sibling, _)| &sibling[..]), |
accessing first element with `chunk.get(0)`: zcash_proofs/src/circuit/ecc.rs#L39
warning: accessing first element with `chunk.get(0)` --> zcash_proofs/src/circuit/ecc.rs:39:23 | 39 | let chunk_a = chunk | _______________________^ 40 | | .get(0) | |___________________^ help: try: `chunk.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first = note: `-W clippy::get-first` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::get_first)]`
the borrowed expression implements the required traits: zcash_client_backend/build.rs#L5
warning: the borrowed expression implements the required traits --> zcash_client_backend/build.rs:5:19 | 5 | .includes(&["proto"]) | ^^^^^^^^^^ help: change this to: `["proto"]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
the borrowed expression implements the required traits: zcash_client_backend/build.rs#L4
warning: the borrowed expression implements the required traits --> zcash_client_backend/build.rs:4:17 | 4 | .inputs(&["proto/compact_formats.proto"]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["proto/compact_formats.proto"]` | = 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)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/extensions/transparent.rs#L150
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/extensions/transparent.rs:150:13 | 150 | &context, | ^^^^^^^^ help: change this to: `context` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value: zcash_primitives/src/zip32.rs#L87
warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value --> zcash_primitives/src/zip32.rs:87:17 | 87 | fn to_index(&self) -> u32 { | ^^^^^ | = help: consider choosing a less ambiguous name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention = note: `-W clippy::wrong-self-convention` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::wrong_self_convention)]`
the borrowed expression implements the required traits: zcash_primitives/src/transaction/util/sha256d.rs#L59
warning: the borrowed expression implements the required traits --> zcash_primitives/src/transaction/util/sha256d.rs:59:28 | 59 | 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 = 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)]`
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/transaction/sighash.rs#L336
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/transaction/sighash.rs:336:17 | 336 | (&mut data) | ^^^^^^^^^^^ help: change this to: `data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/transaction/sighash.rs#L238
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/transaction/sighash.rs:238:9 | 238 | (&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
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/transaction/sighash.rs#L93
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/transaction/sighash.rs:93:9 | 93 | (&mut data) | ^^^^^^^^^^^ help: change this to: `data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
name `PHGR` contains a capitalized acronym: zcash_primitives/src/transaction/components/sprout.rs#L17
warning: name `PHGR` contains a capitalized acronym --> zcash_primitives/src/transaction/components/sprout.rs:17:5 | 17 | PHGR([u8; PHGR_PROOF_SIZE]), | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Phgr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms = note: `-W clippy::upper-case-acronyms` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::upper_case_acronyms)]`
manual `RangeInclusive::contains` implementation: zcash_primitives/src/transaction/components/amount.rs#L33
warning: manual `RangeInclusive::contains` implementation --> zcash_primitives/src/transaction/components/amount.rs:33:12 | 33 | 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)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/transaction/builder.rs#L323
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/transaction/builder.rs:323:50 | 323 | builder: Box::new(move |ctx| builder(&ctx).map(|x| x.to_payload())), | ^^^^ help: change this to: `ctx` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
use of `default` to create a unit struct: zcash_primitives/src/transaction/builder.rs#L146
warning: use of `default` to create a unit struct --> zcash_primitives/src/transaction/builder.rs:146:33 | 146 | _params: PhantomData::default(), | ^^^^^^^^^^^ help: remove this call to `default` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs = note: `-W clippy::default-constructed-unit-structs` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::default_constructed_unit_structs)]`
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/sapling.rs#L404
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/sapling.rs:404:9 | 404 | (&mut note_contents) | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `note_contents` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/sapling.rs#L153
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/sapling.rs:153:5 | 153 | (&mut data_to_be_signed[32..64]).copy_from_slice(&sighash[..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_to_be_signed[32..64]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the following explicit lifetimes could be elided: 'a: zcash_primitives/src/sapling/redjubjub.rs#L160
warning: the following explicit lifetimes could be elided: 'a --> zcash_primitives/src/sapling/redjubjub.rs:160:21 | 160 | pub fn batch_verify<'a, R: RngCore>( | ^^ 161 | mut rng: &mut R, 162 | batch: &[BatchEntry<'a>], | ^^ | = 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 | 160 ~ pub fn batch_verify<R: RngCore>( 161 | mut rng: &mut R, 162 ~ batch: &[BatchEntry<'_>], |
using `clone` on type `SubgroupPoint` which implements the `Copy` trait: zcash_primitives/src/sapling/prover.rs#L109
warning: using `clone` on type `SubgroupPoint` which implements the `Copy` trait --> zcash_primitives/src/sapling/prover.rs:109:32 | 109 | let rk = PublicKey(proof_generation_key.ak.clone().into()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `proof_generation_key.ak` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `-W clippy::clone-on-copy` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::clone_on_copy)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/pedersen_hash.rs#L90
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/pedersen_hash.rs:90:13 | 90 | &generators.next().expect("we don't have enough generators"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `generators.next().expect("we don't have enough generators")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: zcash_primitives/src/sapling/pedersen_hash.rs#L41
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> zcash_primitives/src/sapling/pedersen_hash.rs:41:16 | 41 | .chain(bits.into_iter()); | ^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `bits` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/75b064d26970ca8e7a487072f51835ebb057d575/library/core/src/iter/traits/iterator.rs:524:12 = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `-W clippy::useless-conversion` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::useless_conversion)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L414
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:414:13 | 414 | &ovk, | ^^^^ help: change this to: `ovk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L262
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:262:51 | 262 | sapling_parse_note_plaintext_without_memo(&self, plaintext, |diversifier| { | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L250
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:250:51 | 250 | sapling_parse_note_plaintext_without_memo(&self, plaintext, |diversifier| { | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this `impl` can be derived: zcash_primitives/src/memo.rs#L175
warning: this `impl` can be derived --> zcash_primitives/src/memo.rs:175:1 | 175 | / impl Default for Memo { 176 | | fn default() -> Self { 177 | | Memo::Empty 178 | | } 179 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `-W clippy::derivable-impls` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::derivable_impls)]` = help: remove the manual implementation... help: ...and instead derive it... | 149 + #[derive(Default)] 150 | pub enum Memo { | help: ...and mark the default variant | 151 ~ #[default] 152 ~ Empty, |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/block.rs#L33
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/block.rs:33:30 | 33 | hash.copy_from_slice(&bytes); | ^^^^^^ help: change this to: `bytes` | = 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)]`
variable does not need to be mutable: zcash_primitives/src/transaction/builder.rs#L850
warning: variable does not need to be mutable --> zcash_primitives/src/transaction/builder.rs:850:17 | 850 | let mut current = self.mtx.tze_inputs.get_mut(i).unwrap(); | ----^^^^^^^ | | | help: remove this `mut` | = note: `#[warn(unused_mut)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: components/equihash/src/verify.rs#L317
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/equihash/src/verify.rs:317:26 | 317 | Ok(Node::new(&p, &state, indices[0])) | ^^^^^^ help: change this to: `state` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/equihash/src/verify.rs#L317
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/equihash/src/verify.rs:317:22 | 317 | Ok(Node::new(&p, &state, indices[0])) | ^^ help: change this to: `p` | = 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)]`
usage of `mem::size_of::<T>()` to obtain the size of `T` in bits: components/equihash/src/verify.rs#L224
warning: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits --> components/equihash/src/verify.rs:224:23 | 224 | let len_indices = 8 * size_of::<u32>() * minimal.len() / (c_bit_len + 1); | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u32::BITS as usize` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits
usage of `mem::size_of::<T>()` to obtain the size of `T` in bits: components/equihash/src/verify.rs#L173
warning: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits --> components/equihash/src/verify.rs:173:13 | 173 | assert!(8 * size_of::<u32>() >= 7 + bit_len); | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u32::BITS as usize` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits = note: `-W clippy::manual-bits` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::manual_bits)]`
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L461
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:461:31 | 461 | .open_to(&mut op, &out_ciphertext, &[], ock.as_ref(), &[0u8; 12]) | ^^^^^^^^^^^^^^^ help: change this to: `out_ciphertext` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L423
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:423:41 | 423 | let shared_secret = D::ka_agree_dec(&ivk, output.epk()); | ^^^^ help: change this to: `ivk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L392
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:392:57 | 392 | if D::epk_bytes(&D::ka_derive_public(&note, &derived_esk)) | ^^^^^^^^^^^^ help: change this to: `derived_esk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L392
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:392:50 | 392 | if D::epk_bytes(&D::ka_derive_public(&note, &derived_esk)) | ^^^^^ help: change this to: `note` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L391
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:391:28 | 391 | D::check_epk_bytes(&note, |derived_esk| { | ^^^^^ help: change this to: `note` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L387
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:387:56 | 387 | if D::ExtractedCommitmentBytes::try_from(D::cmstar(&note)) | ^^^^^ help: change this to: `note` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L373
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:373:72 | 373 | let (note, to) = domain.parse_note_plaintext_without_memo_ivk(ivk, &plaintext)?; | ^^^^^^^^^^ help: change this to: `plaintext` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L295
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:295:47 | 295 | let ock = D::derive_ock(ovk, &cv, &cmstar, &D::epk_bytes(&self.epk)); | ^^^^^^^ help: change this to: `cmstar` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L295
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:295:42 | 295 | let ock = D::derive_ock(ovk, &cv, &cmstar, &D::epk_bytes(&self.epk)); | ^^^ help: change this to: `cv` | = 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)]`
Clippy (nightly)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Clippy (nightly)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Clippy (nightly)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Clippy (nightly)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Clippy (nightly)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
the borrowed expression implements the required traits: zcash_proofs/src/lib.rs#L163
warning: the borrowed expression implements the required traits --> zcash_proofs/src/lib.rs:163:37 | 163 | VerifyingKey::<Bls12>::read(&mut fs) | ^^^^^^^ help: change this to: `fs` | = 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)]`
this expression borrows a value the compiler would automatically borrow: zcash_proofs/src/sapling/verifier.rs#L161
warning: this expression borrows a value the compiler would automatically borrow --> zcash_proofs/src/sapling/verifier.rs:161:9 | 161 | (&mut data_to_be_signed[32..64]).copy_from_slice(&sighash_value[..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_to_be_signed[32..64]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_proofs/src/sapling/verifier.rs#L62
warning: this expression borrows a value the compiler would automatically borrow --> zcash_proofs/src/sapling/verifier.rs:62:9 | 62 | (&mut data_to_be_signed[32..64]).copy_from_slice(&sighash_value[..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_to_be_signed[32..64]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_proofs/src/sapling/prover.rs#L247
warning: this expression borrows a value the compiler would automatically borrow --> zcash_proofs/src/sapling/prover.rs:247:9 | 247 | (&mut data_to_be_signed[32..64]).copy_from_slice(&sighash[..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_to_be_signed[32..64]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
using `clone` on type `SubgroupPoint` which implements the `Copy` trait: zcash_proofs/src/sapling/prover.rs#L90
warning: using `clone` on type `SubgroupPoint` which implements the `Copy` trait --> zcash_proofs/src/sapling/prover.rs:90:23 | 90 | PublicKey(proof_generation_key.ak.clone().into()).randomize(ar, SPENDING_KEY_GENERATOR); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `proof_generation_key.ak` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `-W clippy::clone-on-copy` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::clone_on_copy)]`
used `unwrap()` on `Some` value: zcash_proofs/src/circuit/sprout/mod.rs#L460
warning: used `unwrap()` on `Some` value --> zcash_proofs/src/circuit/sprout/mod.rs:460:40 | 460 | .write_u64::<LittleEndian>(vpub_new.unwrap()) | ^^^^^^^^^^^^^^^^^ | help: remove the `Some` and `unwrap()` --> zcash_proofs/src/circuit/sprout/mod.rs:413:24 | 413 | let vpub_new = Some(test_vector.read_u64::<LittleEndian>().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_literal_unwrap
used `unwrap()` on `Some` value: zcash_proofs/src/circuit/sprout/mod.rs#L457
warning: used `unwrap()` on `Some` value --> zcash_proofs/src/circuit/sprout/mod.rs:457:40 | 457 | .write_u64::<LittleEndian>(vpub_old.unwrap()) | ^^^^^^^^^^^^^^^^^ | help: remove the `Some` and `unwrap()` --> zcash_proofs/src/circuit/sprout/mod.rs:412:24 | 412 | let vpub_old = Some(test_vector.read_u64::<LittleEndian>().unwrap()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_literal_unwrap
used `unwrap()` on `Some` value: zcash_proofs/src/circuit/sprout/mod.rs#L449
warning: used `unwrap()` on `Some` value --> zcash_proofs/src/circuit/sprout/mod.rs:449:32 | 449 | expected_inputs.extend(h_sig.unwrap().to_vec()); | ^^^^^^^^^^^^^^ | help: remove the `Some` and `unwrap()` --> zcash_proofs/src/circuit/sprout/mod.rs:362:21 | 362 | let h_sig = Some(get_u256(&mut test_vector)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_literal_unwrap
used `unwrap()` on `Some` value: zcash_proofs/src/circuit/sprout/mod.rs#L448
warning: used `unwrap()` on `Some` value --> zcash_proofs/src/circuit/sprout/mod.rs:448:32 | 448 | expected_inputs.extend(rt.unwrap().to_vec()); | ^^^^^^^^^^^ | help: remove the `Some` and `unwrap()` --> zcash_proofs/src/circuit/sprout/mod.rs:361:18 | 361 | let rt = Some(get_u256(&mut test_vector)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_literal_unwrap = note: `-W clippy::unnecessary-literal-unwrap` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_literal_unwrap)]`
dereferencing a tuple pattern where every element takes a reference: zcash_proofs/src/circuit/sprout/input.rs#L69
warning: dereferencing a tuple pattern where every element takes a reference --> zcash_proofs/src/circuit/sprout/input.rs:69:37 | 69 | layer.as_ref().map(|&(ref sibling, _)| &sibling[..]), | ^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference = note: `-W clippy::needless-borrowed-reference` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrowed_reference)]` help: try removing the `&` and `ref` parts | 69 - layer.as_ref().map(|&(ref sibling, _)| &sibling[..]), 69 + layer.as_ref().map(|(sibling, _)| &sibling[..]), |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_proofs/src/circuit/sapling.rs#L740
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_proofs/src/circuit/sapling.rs:740:45 | 740 | bls12_381::Scalar::from_str(&expected_commitment_vs[i as usize]).unwrap() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `expected_commitment_vs[i as usize]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_proofs/src/circuit/sapling.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_proofs/src/circuit/sapling.rs:736:45 | 736 | bls12_381::Scalar::from_str(&expected_commitment_us[i as usize]).unwrap() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `expected_commitment_us[i as usize]` | = 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)]`
useless use of `vec!`: zcash_proofs/src/circuit/sapling.rs#L683
warning: useless use of `vec!` --> zcash_proofs/src/circuit/sapling.rs:683:34 | 683 | let expected_commitment_vs = vec![ | __________________________________^ 684 | | "27630722367128086497290371604583225252915685718989450292520883698391703910", 685 | | "23310648738313092772044712773481584369462075017189681529702825235349449805260", 686 | | "25709635353183537915646348052945798827495141780341329896098121888376871589480", ... | 693 | | "32959334601512756708397683646222389414681003290313255304927423560477040775488", 694 | | ]; | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec help: you can use an array directly | 683 ~ let expected_commitment_vs = ["27630722367128086497290371604583225252915685718989450292520883698391703910", 684 + "23310648738313092772044712773481584369462075017189681529702825235349449805260", 685 + "25709635353183537915646348052945798827495141780341329896098121888376871589480", 686 + "10516315852014492141081718791576479298042117442649432716255936672048164184691", 687 + "23970713991179488695004801139667700217127937225554773561645815034212389459772", 688 + "3256052161046564597126736968199320852691566092694819239485673781545479548450", 689 + "18887250722195819674378865377623103071236046274361890247643850134985809137409", 690 + "36501156873031641173054592888886902104303750771545647842488588827138867116570", 691 + "21927526310070011864833939629345235038589128172309792087590183778192091594775", 692 ~ "32959334601512756708397683646222389414681003290313255304927423560477040775488"]; |
useless use of `vec!`: zcash_proofs/src/circuit/sapling.rs#L670
warning: useless use of `vec!` --> zcash_proofs/src/circuit/sapling.rs:670:34 | 670 | let expected_commitment_us = vec![ | __________________________________^ 671 | | "43821661663052659750276289184181083197337192946256245809816728673021647664276", 672 | | "7220807656052227578299730541645543434083158611414003423211850718229633594616", 673 | | "13239753550660714843257636471668037031928211668773449453628093339627668081697", ... | 680 | | "18269767207277008186871145355531741929166733260352590789136389380124992250945", 681 | | ]; | |_____^ | = 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)]` help: you can use an array directly | 670 ~ let expected_commitment_us = ["43821661663052659750276289184181083197337192946256245809816728673021647664276", 671 + "7220807656052227578299730541645543434083158611414003423211850718229633594616", 672 + "13239753550660714843257636471668037031928211668773449453628093339627668081697", 673 + "10900524635678389360790699587556574797582192824300145558807405770494079767974", 674 + "1411013767457690636461779630023011774660680126764323588543800715293173598850", 675 + "32334206652383066267661379202183359608706535021387905923603014648832344657662", 676 + "20206750741605167608500278423400565295188703622528437817438897624149653579380", 677 + "46716485782200334735478719487356079850582051575003452698983255860512578229998", 678 + "31221372899739042781372142393132358519434268512685538373976981051223051220367", 679 ~ "18269767207277008186871145355531741929166733260352590789136389380124992250945"]; |
accessing first element with `chunk.get(0)`: zcash_proofs/src/circuit/ecc.rs#L39
warning: accessing first element with `chunk.get(0)` --> zcash_proofs/src/circuit/ecc.rs:39:23 | 39 | let chunk_a = chunk | _______________________^ 40 | | .get(0) | |___________________^ help: try: `chunk.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first = note: `-W clippy::get-first` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::get_first)]`
this expression creates a reference which is immediately dereferenced by the compiler: components/equihash/src/verify.rs#L495
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/equihash/src/verify.rs:495:77 | 495 | is_valid_solution_recursive(tv.params, tv.input, &tv.nonce, &tv.solution) | ^^^^^^^^^^^^ help: change this to: `tv.solution` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/equihash/src/verify.rs#L489
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/equihash/src/verify.rs:489:77 | 489 | is_valid_solution_iterative(tv.params, tv.input, &tv.nonce, &tv.solution) | ^^^^^^^^^^^^ help: change this to: `tv.solution` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/equihash/src/verify.rs#L317
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/equihash/src/verify.rs:317:26 | 317 | Ok(Node::new(&p, &state, indices[0])) | ^^^^^^ help: change this to: `state` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/equihash/src/verify.rs#L317
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/equihash/src/verify.rs:317:22 | 317 | Ok(Node::new(&p, &state, indices[0])) | ^^ help: change this to: `p` | = 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)]`
usage of `mem::size_of::<T>()` to obtain the size of `T` in bits: components/equihash/src/verify.rs#L224
warning: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits --> components/equihash/src/verify.rs:224:23 | 224 | let len_indices = 8 * size_of::<u32>() * minimal.len() / (c_bit_len + 1); | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u32::BITS as usize` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits
usage of `mem::size_of::<T>()` to obtain the size of `T` in bits: components/equihash/src/verify.rs#L173
warning: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits --> components/equihash/src/verify.rs:173:13 | 173 | assert!(8 * size_of::<u32>() >= 7 + bit_len); | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u32::BITS as usize` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits = note: `-W clippy::manual-bits` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::manual_bits)]`
the following explicit lifetimes could be elided: 'a: zcash_extensions/src/transparent/demo.rs#L102
warning: the following explicit lifetimes could be elided: 'a --> zcash_extensions/src/transparent/demo.rs:102:12 | 102 | fn fmt<'a>(&self, f: &mut fmt::Formatter<'a>) -> fmt::Result { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 102 - fn fmt<'a>(&self, f: &mut fmt::Formatter<'a>) -> fmt::Result { 102 + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
the following explicit lifetimes could be elided: 'a: zcash_extensions/src/consensus/transparent.rs#L98
warning: the following explicit lifetimes could be elided: 'a --> zcash_extensions/src/consensus/transparent.rs:98:15 | 98 | fn verify<'a>( | ^^ ... 102 | ctx: &Context<'a>, | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 98 ~ fn verify( 99 | &self, 100 | precondition: &Precondition, 101 | witness: &Witness, 102 ~ ctx: &Context<'_>, |
the following explicit lifetimes could be elided: 'a: zcash_extensions/src/consensus/transparent.rs#L67
warning: the following explicit lifetimes could be elided: 'a --> zcash_extensions/src/consensus/transparent.rs:67:15 | 67 | fn verify<'a>( | ^^ ... 71 | ctx: &Context<'a>, | ^^ | = 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 | 67 ~ fn verify( 68 | &self, 69 | precondition: &Precondition, 70 | witness: &Witness, 71 ~ ctx: &Context<'_>, |
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L461
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:461:31 | 461 | .open_to(&mut op, &out_ciphertext, &[], ock.as_ref(), &[0u8; 12]) | ^^^^^^^^^^^^^^^ help: change this to: `out_ciphertext` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L423
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:423:41 | 423 | let shared_secret = D::ka_agree_dec(&ivk, output.epk()); | ^^^^ help: change this to: `ivk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L392
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:392:57 | 392 | if D::epk_bytes(&D::ka_derive_public(&note, &derived_esk)) | ^^^^^^^^^^^^ help: change this to: `derived_esk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L392
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:392:50 | 392 | if D::epk_bytes(&D::ka_derive_public(&note, &derived_esk)) | ^^^^^ help: change this to: `note` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L391
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:391:28 | 391 | D::check_epk_bytes(&note, |derived_esk| { | ^^^^^ help: change this to: `note` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L387
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:387:56 | 387 | if D::ExtractedCommitmentBytes::try_from(D::cmstar(&note)) | ^^^^^ help: change this to: `note` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L373
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:373:72 | 373 | let (note, to) = domain.parse_note_plaintext_without_memo_ivk(ivk, &plaintext)?; | ^^^^^^^^^^ help: change this to: `plaintext` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L295
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:295:47 | 295 | let ock = D::derive_ock(ovk, &cv, &cmstar, &D::epk_bytes(&self.epk)); | ^^^^^^^ help: change this to: `cmstar` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L295
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:295:42 | 295 | let ock = D::derive_ock(ovk, &cv, &cmstar, &D::epk_bytes(&self.epk)); | ^^^ help: change this to: `cv` | = 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)]`
the following explicit lifetimes could be elided: 'a: zcash_extensions/src/transparent/demo.rs#L102
warning: the following explicit lifetimes could be elided: 'a --> zcash_extensions/src/transparent/demo.rs:102:12 | 102 | fn fmt<'a>(&self, f: &mut fmt::Formatter<'a>) -> fmt::Result { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 102 - fn fmt<'a>(&self, f: &mut fmt::Formatter<'a>) -> fmt::Result { 102 + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
the following explicit lifetimes could be elided: 'a: zcash_extensions/src/consensus/transparent.rs#L98
warning: the following explicit lifetimes could be elided: 'a --> zcash_extensions/src/consensus/transparent.rs:98:15 | 98 | fn verify<'a>( | ^^ ... 102 | ctx: &Context<'a>, | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 98 ~ fn verify( 99 | &self, 100 | precondition: &Precondition, 101 | witness: &Witness, 102 ~ ctx: &Context<'_>, |
the following explicit lifetimes could be elided: 'a: zcash_extensions/src/consensus/transparent.rs#L67
warning: the following explicit lifetimes could be elided: 'a --> zcash_extensions/src/consensus/transparent.rs:67:15 | 67 | fn verify<'a>( | ^^ ... 71 | ctx: &Context<'a>, | ^^ | = 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 | 67 ~ fn verify( 68 | &self, 69 | precondition: &Precondition, 70 | witness: &Witness, 71 ~ ctx: &Context<'_>, |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_extras/src/wallet.rs#L188
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_extras/src/wallet.rs:188:77 | 188 | RecipientAddress::Transparent(to) => builder.add_transparent_output(&to, value), | ^^^ help: change this to: `to` | = 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)]`
unused imports: `ReceivedTransaction`, `decrypt_transaction`: zcash_extras/src/wallet.rs#L19
warning: unused imports: `ReceivedTransaction`, `decrypt_transaction` --> zcash_extras/src/wallet.rs:19:30 | 19 | data_api::{error::Error, ReceivedTransaction, SentTransaction}, | ^^^^^^^^^^^^^^^^^^^ 20 | decrypt_transaction, | ^^^^^^^^^^^^^^^^^^^
unused imports: `NetworkUpgrade`, `Transaction`: zcash_extras/src/wallet.rs#L5
warning: unused imports: `NetworkUpgrade`, `Transaction` --> zcash_extras/src/wallet.rs:5:33 | 5 | consensus::{self, BranchId, NetworkUpgrade}, | ^^^^^^^^^^^^^^ ... 11 | Transaction, | ^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/extensions/transparent.rs#L150
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/extensions/transparent.rs:150:13 | 150 | &context, | ^^^^^^^^ help: change this to: `context` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
accessing first element with `peaks.get(0)`: zcash_history/src/tree.rs#L248
warning: accessing first element with `peaks.get(0)` --> zcash_history/src/tree.rs:248:29 | 248 | let mut new_root = *peaks.get(0).expect("At lest 1 elements in peaks"); | ^^^^^^^^^^^^ help: try: `peaks.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first = note: `-W clippy::get-first` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::get_first)]`
the borrowed expression implements the required traits: zcash_history/src/node_data.rs#L239
warning: the borrowed expression implements the required traits --> zcash_history/src/node_data.rs:239:59 | 239 | TestResult::from_bool(NodeData::from_bytes(0, &node_data.to_bytes()).unwrap() == node_data) | ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `node_data.to_bytes()` | = 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)]`
methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value: zcash_primitives/src/zip32.rs#L87
warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value --> zcash_primitives/src/zip32.rs:87:17 | 87 | fn to_index(&self) -> u32 { | ^^^^^ | = help: consider choosing a less ambiguous name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention = note: `-W clippy::wrong-self-convention` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::wrong_self_convention)]`
the borrowed expression implements the required traits: zcash_history/examples/write.rs#L35
warning: the borrowed expression implements the required traits --> zcash_history/examples/write.rs:35:46 | 35 | let mut file = std::fs::File::create(&out_file_path).expect("Failed to create output file"); | ^^^^^^^^^^^^^^ help: change this to: `out_file_path` | = 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)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/lib.rs#L477
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/lib.rs#L415
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/lib.rs#L410
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
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/wallet.rs#L822
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/wallet.rs:822:20 | 822 | assert_eq!((&db_data).get_target_and_anchor_heights().unwrap(), None); | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L765
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L718
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L680
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>, |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/wallet.rs#L662
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/wallet.rs#L660
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
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L631
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L616
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L578
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L551
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L529
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>, |
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/wallet/transact.rs#L693
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/wallet/transact.rs:693:34 | 693 | let (_, anchor_height) = (&db_data).get_target_and_anchor_heights().unwrap().unwrap(); | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/wallet/transact.rs#L358
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/wallet/transact.rs:358:35 | 358 | let (_, anchor_height2) = (&db_data).get_target_and_anchor_heights().unwrap().unwrap(); | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/wallet/transact.rs#L340
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/wallet/transact.rs:340:34 | 340 | let (_, anchor_height) = (&db_data).get_target_and_anchor_heights().unwrap().unwrap(); | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/for_async/mod.rs#L363
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/for_async/mod.rs#L350
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/for_async/mod.rs#L338
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
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L314
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:314:13 | 314 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L290
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:290:13 | 290 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L242
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:242:13 | 242 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L218
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:218:13 | 218 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L174
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:174:13 | 174 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L163
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:163:13 | 163 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L146
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:146:13 | 146 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L134
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:134:13 | 134 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_client_sqlite/src/chain.rs#L117
warning: this expression borrows a value the compiler would automatically borrow --> zcash_client_sqlite/src/chain.rs:117:13 | 117 | (&db_data).get_max_height_hash().unwrap(), | ^^^^^^^^^^ help: change this to: `db_data` | = 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)]`
useless use of `vec!`: zcash_primitives/src/transaction/tests.rs#L96
warning: useless use of `vec!` --> zcash_primitives/src/transaction/tests.rs:96:21 | 96 | let txn_bytes = vec![ | _____________________^ 97 | | 0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x01, 0x52, 0x52, 0x52, 0x52, 98 | | 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 99 | | 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x00, 0x00, ... | 106 | | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 107 | | ]; | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec help: you can use an array directly | 96 ~ let txn_bytes = [0xFF, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x01, 0x52, 0x52, 0x52, 0x52, 97 + 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 98 + 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x00, 0x00, 99 + 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 100 + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 101 + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x30, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 102 + 0x00, 0x00, 0x01, 0x20, 0xd9, 0x81, 0x80, 0x87, 0xde, 0x72, 0x44, 0xab, 0xc1, 0xb5, 0xfc, 103 + 0xf2, 0x8e, 0x55, 0xe4, 0x2c, 0x7f, 0xf9, 0xc6, 0x78, 0xc0, 0x60, 0x51, 0x81, 0xf3, 0x7a, 104 + 0xc5, 0xd7, 0x41, 0x4a, 0x7b, 0x95, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 105 ~ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]; |
the borrowed expression implements the required traits: zcash_primitives/src/transaction/util/sha256d.rs#L59
warning: the borrowed expression implements the required traits --> zcash_primitives/src/transaction/util/sha256d.rs:59:28 | 59 | 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 = 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)]`
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/transaction/sighash.rs#L336
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/transaction/sighash.rs:336:17 | 336 | (&mut data) | ^^^^^^^^^^^ help: change this to: `data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/transaction/sighash.rs#L238
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/transaction/sighash.rs:238:9 | 238 | (&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
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/transaction/sighash.rs#L93
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/transaction/sighash.rs:93:9 | 93 | (&mut data) | ^^^^^^^^^^^ help: change this to: `data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
name `PHGR` contains a capitalized acronym: zcash_primitives/src/transaction/components/sprout.rs#L17
warning: name `PHGR` contains a capitalized acronym --> zcash_primitives/src/transaction/components/sprout.rs:17:5 | 17 | PHGR([u8; PHGR_PROOF_SIZE]), | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Phgr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms = note: `-W clippy::upper-case-acronyms` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::upper_case_acronyms)]`
manual `RangeInclusive::contains` implementation: zcash_primitives/src/transaction/components/amount.rs#L33
warning: manual `RangeInclusive::contains` implementation --> zcash_primitives/src/transaction/components/amount.rs:33:12 | 33 | 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)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/transaction/builder.rs#L323
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/transaction/builder.rs:323:50 | 323 | builder: Box::new(move |ctx| builder(&ctx).map(|x| x.to_payload())), | ^^^^ help: change this to: `ctx` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
use of `default` to create a unit struct: zcash_primitives/src/transaction/builder.rs#L146
warning: use of `default` to create a unit struct --> zcash_primitives/src/transaction/builder.rs:146:33 | 146 | _params: PhantomData::default(), | ^^^^^^^^^^^ help: remove this call to `default` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs = note: `-W clippy::default-constructed-unit-structs` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::default_constructed_unit_structs)]`
use of deprecated method `rusqlite::Statement::<'_>::execute_named`: You can use `execute` with named params now.: zcash_client_sqlite/src/wallet.rs#L662
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)?; | ^^^^^^^^^^^^^
use of deprecated method `rusqlite::Statement::<'_>::execute_named`: You can use `execute` with named params now.: zcash_client_sqlite/src/wallet.rs#L660
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 { | ^^^^^^^^^^^^^
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#L137
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, _>( | ^^^^^^^^^^^^^^^^^^^^
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#L79
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
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/sapling.rs#L404
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/sapling.rs:404:9 | 404 | (&mut note_contents) | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `note_contents` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/sapling.rs#L153
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/sapling.rs:153:5 | 153 | (&mut data_to_be_signed[32..64]).copy_from_slice(&sighash[..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_to_be_signed[32..64]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the following explicit lifetimes could be elided: 'a: zcash_primitives/src/sapling/redjubjub.rs#L160
warning: the following explicit lifetimes could be elided: 'a --> zcash_primitives/src/sapling/redjubjub.rs:160:21 | 160 | pub fn batch_verify<'a, R: RngCore>( | ^^ 161 | mut rng: &mut R, 162 | batch: &[BatchEntry<'a>], | ^^ | = 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 | 160 ~ pub fn batch_verify<R: RngCore>( 161 | mut rng: &mut R, 162 ~ batch: &[BatchEntry<'_>], |
using `clone` on type `SubgroupPoint` which implements the `Copy` trait: zcash_primitives/src/sapling/prover.rs#L109
warning: using `clone` on type `SubgroupPoint` which implements the `Copy` trait --> zcash_primitives/src/sapling/prover.rs:109:32 | 109 | let rk = PublicKey(proof_generation_key.ak.clone().into()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `proof_generation_key.ak` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `-W clippy::clone-on-copy` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::clone_on_copy)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/pedersen_hash.rs#L90
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/pedersen_hash.rs:90:13 | 90 | &generators.next().expect("we don't have enough generators"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `generators.next().expect("we don't have enough generators")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: zcash_primitives/src/sapling/pedersen_hash.rs#L41
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> zcash_primitives/src/sapling/pedersen_hash.rs:41:16 | 41 | .chain(bits.into_iter()); | ^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `bits` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/75b064d26970ca8e7a487072f51835ebb057d575/library/core/src/iter/traits/iterator.rs:524:12 = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `-W clippy::useless-conversion` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::useless_conversion)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L584
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:584:59 | 584 | .seal_to(enc_ciphertext, &plaintext, &[], &key.as_bytes(), &[0u8; 12]) | ^^^^^^^^^^^^^^^ help: change this to: `key.as_bytes()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L565
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:565:57 | 565 | let key = kdf_sapling(shared_secret, &epk_bytes(&epk)); | ^^^^ help: change this to: `epk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L550
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:550:38 | 550 | let ock = prf_ock(&ovk, &cv, &cmu, &epk_bytes(epk)); | ^^^^ help: change this to: `cmu` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L550
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:550:33 | 550 | let ock = prf_ock(&ovk, &cv, &cmu, &epk_bytes(epk)); | ^^^ help: change this to: `cv` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L550
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:550:27 | 550 | let ock = prf_ock(&ovk, &cv, &cmu, &epk_bytes(epk)); | ^^^^ help: change this to: `ovk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L911
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:911:64 | 911 | let i10r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_10); | ^^^^^^^^^^^ help: change this to: `invalid_10` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L905
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:905:63 | 905 | let i9r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_9); | ^^^^^^^^^^ help: change this to: `invalid_9` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L900
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:900:63 | 900 | let i8r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_8); | ^^^^^^^^^^ help: change this to: `invalid_8` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L894
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:894:64 | 894 | let i7ar = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_7a); | ^^^^^^^^^^^ help: change this to: `invalid_7a` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L888
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:888:63 | 888 | let i7r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_7); | ^^^^^^^^^^ help: change this to: `invalid_7` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L882
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:882:63 | 882 | let i6r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_6); | ^^^^^^^^^^ help: change this to: `invalid_6` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L877
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:877:63 | 877 | let i5r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_5); | ^^^^^^^^^^ help: change this to: `invalid_5` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L871
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:871:63 | 871 | let i4r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_4); | ^^^^^^^^^^ help: change this to: `invalid_4` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L865
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:865:63 | 865 | let i3r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_3); | ^^^^^^^^^^ help: change this to: `invalid_3` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L860
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:860:63 | 860 | let i2r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_2); | ^^^^^^^^^^ help: change this to: `invalid_2` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L855
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:855:63 | 855 | let i1r = TransactionRequest::from_uri(&TEST_NETWORK, &invalid_1); | ^^^^^^^^^^ help: change this to: `invalid_1` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
accessing first element with `v4r.payments.get(0)`: zcash_client_backend/src/zip321.rs#L846
warning: accessing first element with `v4r.payments.get(0)` --> zcash_client_backend/src/zip321.rs:846:13 | 846 | v4r.payments.get(0).map(|p| p.amount), | ^^^^^^^^^^^^^^^^^^^ help: try: `v4r.payments.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L844
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:844:63 | 844 | let v4r = TransactionRequest::from_uri(&TEST_NETWORK, &valid_4).unwrap(); | ^^^^^^^^ help: change this to: `valid_4` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
accessing first element with `v3r.payments.get(0)`: zcash_client_backend/src/zip321.rs#L837
warning: accessing first element with `v3r.payments.get(0)` --> zcash_client_backend/src/zip321.rs:837:13 | 837 | v3r.payments.get(0).map(|p| p.amount), | ^^^^^^^^^^^^^^^^^^^ help: try: `v3r.payments.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L835
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:835:63 | 835 | let v3r = TransactionRequest::from_uri(&TEST_NETWORK, &valid_3).unwrap(); | ^^^^^^^^ help: change this to: `valid_3` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L414
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:414:13 | 414 | &ovk, | ^^^^ help: change this to: `ovk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
accessing first element with `v2r.payments.get(0)`: zcash_client_backend/src/zip321.rs#L824
warning: accessing first element with `v2r.payments.get(0)` --> zcash_client_backend/src/zip321.rs:824:13 | 824 | v2r.payments.get(0).map(|p| p.amount), | ^^^^^^^^^^^^^^^^^^^ help: try: `v2r.payments.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L821
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:821:67 | 821 | let mut v2r = TransactionRequest::from_uri(&TEST_NETWORK, &valid_2).unwrap(); | ^^^^^^^^ help: change this to: `valid_2` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
accessing first element with `v1r.payments.get(0)`: zcash_client_backend/src/zip321.rs#L816
warning: accessing first element with `v1r.payments.get(0)` --> zcash_client_backend/src/zip321.rs:816:13 | 816 | v1r.payments.get(0).map(|p| p.amount), | ^^^^^^^^^^^^^^^^^^^ help: try: `v1r.payments.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first = note: `-W clippy::get-first` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::get_first)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L814
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:814:63 | 814 | let v1r = TransactionRequest::from_uri(&TEST_NETWORK, &valid_1).unwrap(); | ^^^^^^^^ help: change this to: `valid_1` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L761
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:761:90 | 761 | ...ent_address(&TEST_NETWORK.hrp_sapling_payment_address(), "ztestsapling1n65uaftvs2g7075q2x2a04shfk066u3lldzxsrprfrqtzxnhc9ps73v4lhx4l9y... | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `TEST_NETWORK.hrp_sapling_payment_address()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L756
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:756:72 | 756 | let parse_result = TransactionRequest::from_uri(&TEST_NETWORK, &uri).unwrap(); | ^^^^ help: change this to: `uri` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L262
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:262:51 | 262 | sapling_parse_note_plaintext_without_memo(&self, plaintext, |diversifier| { | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L250
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:250:51 | 250 | sapling_parse_note_plaintext_without_memo(&self, plaintext, |diversifier| { | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the following explicit lifetimes could be elided: 'a: zcash_client_backend/src/zip321.rs#L562
warning: the following explicit lifetimes could be elided: 'a --> zcash_client_backend/src/zip321.rs:562:25 | 562 | fn to_indexed_param<'a, P: consensus::Parameters>( | ^^ 563 | params: &'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 | 562 ~ fn to_indexed_param<P: consensus::Parameters>( 563 ~ params: &P, |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L233
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:233:51 | 233 | if parse::has_duplicate_param(&current, &p.param) { | ^^^^^^^^ help: change this to: `current` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L195
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:195:51 | 195 | ... .chain(payment_params(&payment, Some(i))) | ^^^^^^^^ help: change this to: `payment` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L176
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:176:51 | 176 | let query_params = payment_params(&payment, None) | ^^^^^^^^ help: change this to: `payment` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L169
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:169:76 | 169 | .map(move |(name, value)| render::str_param(&name, &value, payment_index)), | ^^^^^^ help: change this to: `value` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L169
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:169:69 | 169 | .map(move |(name, value)| render::str_param(&name, &value, payment_index)), | ^^^^^ help: change this to: `name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L163
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:163:63 | 163 | .map(|m| render::str_param("message", &m, payment_index)), | ^^ help: change this to: `m` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L157
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:157:61 | 157 | .map(|m| render::str_param("label", &m, payment_index)), | ^^ help: change this to: `m` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L151
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:151:53 | 151 | .map(|m| render::memo_param(&m, payment_index)), | ^^ help: change this to: `m` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/welding_rig.rs#L70
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/welding_rig.rs:70:54 | 70 | let is_change = spent_from_accounts.contains(&account); | ^^^^^^^^ help: change this to: `account` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this `impl` can be derived: zcash_client_backend/src/wallet.rs#L18
warning: this `impl` can be derived --> zcash_client_backend/src/wallet.rs:18:1 | 18 | / impl Default for AccountId { 19 | | fn default() -> Self { 20 | | AccountId(0) 21 | | } 22 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `-W clippy::derivable-impls` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::derivable_impls)]` = help: remove the manual implementation... help: ...and instead derive it | 16 + #[derive(Default)] 17 | pub struct AccountId(pub u32); |
this `impl` can be derived: zcash_primitives/src/memo.rs#L175
warning: this `impl` can be derived --> zcash_primitives/src/memo.rs:175:1 | 175 | / impl Default for Memo { 176 | | fn default() -> Self { 177 | | Memo::Empty 178 | | } 179 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `-W clippy::derivable-impls` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::derivable_impls)]` = help: remove the manual implementation... help: ...and instead derive it... | 149 + #[derive(Default)] 150 | pub enum Memo { | help: ...and mark the default variant | 151 ~ #[default] 152 ~ Empty, |
useless use of `vec!`: zcash_primitives/src/legacy.rs#L159
warning: useless use of `vec!` --> zcash_primitives/src/legacy.rs:159:30 | 159 | 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)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/keys.rs#L27
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/keys.rs:27:38 | 27 | &ExtendedSpendingKey::master(&seed), | ^^^^^ help: change this to: `seed` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
redundant closure: zcash_client_backend/src/encoding.rs#L33
warning: redundant closure --> zcash_client_backend/src/encoding.rs:33:47 | 33 | Vec::<u8>::from_base32(&data).map(|data| read(data)) | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `read` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `-W clippy::redundant-closure` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::redundant_closure)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/data_api/wallet.rs#L225
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/data_api/wallet.rs:225:77 | 225 | RecipientAddress::Transparent(to) => builder.add_transparent_output(&to, value), | ^^^ help: change this to: `to` | = 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)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/block.rs#L33
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/block.rs:33:30 | 33 | hash.copy_from_slice(&bytes); | ^^^^^^ help: change this to: `bytes` | = 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)]`
fields `p_enc` and `op` are never read: zcash_primitives/src/test_vectors/note_encryption.rs#L15
warning: fields `p_enc` and `op` are never read --> zcash_primitives/src/test_vectors/note_encryption.rs:15:9 | 1 | pub(crate) struct TestVector { | ---------- fields in this struct ... 15 | pub p_enc: [u8; 564], | ^^^^^ ... 18 | pub op: [u8; 64], | ^^ | = note: `#[warn(dead_code)]` on by default
variable does not need to be mutable: zcash_primitives/src/transaction/builder.rs#L850
warning: variable does not need to be mutable --> zcash_primitives/src/transaction/builder.rs:850:17 | 850 | let mut current = self.mtx.tze_inputs.get_mut(i).unwrap(); | ----^^^^^^^ | | | help: remove this `mut` | = note: `#[warn(unused_mut)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/lib.rs#L477
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/lib.rs#L415
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/lib.rs#L410
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
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L765
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L718
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L680
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>, |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/wallet.rs#L662
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/wallet.rs#L660
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
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L631
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L616
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L578
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L551
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>, |
the following explicit lifetimes could be elided: 'a: zcash_client_sqlite/src/wallet.rs#L529
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>, |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/for_async/mod.rs#L363
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/for_async/mod.rs#L350
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
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_sqlite/src/for_async/mod.rs#L338
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)]`
use of deprecated method `rusqlite::Statement::<'_>::execute_named`: You can use `execute` with named params now.: zcash_client_sqlite/src/wallet.rs#L662
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)?; | ^^^^^^^^^^^^^
use of deprecated method `rusqlite::Statement::<'_>::execute_named`: You can use `execute` with named params now.: zcash_client_sqlite/src/wallet.rs#L660
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 { | ^^^^^^^^^^^^^
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#L137
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, _>( | ^^^^^^^^^^^^^^^^^^^^
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#L79
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
accessing first element with `peaks.get(0)`: zcash_history/src/tree.rs#L248
warning: accessing first element with `peaks.get(0)` --> zcash_history/src/tree.rs:248:29 | 248 | let mut new_root = *peaks.get(0).expect("At lest 1 elements in peaks"); | ^^^^^^^^^^^^ help: try: `peaks.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first = note: `-W clippy::get-first` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::get_first)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_extras/src/wallet.rs#L188
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_extras/src/wallet.rs:188:77 | 188 | RecipientAddress::Transparent(to) => builder.add_transparent_output(&to, value), | ^^^ help: change this to: `to` | = 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)]`
unused imports: `ReceivedTransaction`, `decrypt_transaction`: zcash_extras/src/wallet.rs#L19
warning: unused imports: `ReceivedTransaction`, `decrypt_transaction` --> zcash_extras/src/wallet.rs:19:30 | 19 | data_api::{error::Error, ReceivedTransaction, SentTransaction}, | ^^^^^^^^^^^^^^^^^^^ 20 | decrypt_transaction, | ^^^^^^^^^^^^^^^^^^^
unused imports: `NetworkUpgrade`, `Transaction`: zcash_extras/src/wallet.rs#L5
warning: unused imports: `NetworkUpgrade`, `Transaction` --> zcash_extras/src/wallet.rs:5:33 | 5 | consensus::{self, BranchId, NetworkUpgrade}, | ^^^^^^^^^^^^^^ ... 11 | Transaction, | ^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
the following explicit lifetimes could be elided: 'a: zcash_client_backend/src/zip321.rs#L562
warning: the following explicit lifetimes could be elided: 'a --> zcash_client_backend/src/zip321.rs:562:25 | 562 | fn to_indexed_param<'a, P: consensus::Parameters>( | ^^ 563 | params: &'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 | 562 ~ fn to_indexed_param<P: consensus::Parameters>( 563 ~ params: &P, |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L233
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:233:51 | 233 | if parse::has_duplicate_param(&current, &p.param) { | ^^^^^^^^ help: change this to: `current` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L195
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:195:51 | 195 | ... .chain(payment_params(&payment, Some(i))) | ^^^^^^^^ help: change this to: `payment` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L176
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:176:51 | 176 | let query_params = payment_params(&payment, None) | ^^^^^^^^ help: change this to: `payment` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L169
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:169:76 | 169 | .map(move |(name, value)| render::str_param(&name, &value, payment_index)), | ^^^^^^ help: change this to: `value` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L169
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:169:69 | 169 | .map(move |(name, value)| render::str_param(&name, &value, payment_index)), | ^^^^^ help: change this to: `name` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L163
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:163:63 | 163 | .map(|m| render::str_param("message", &m, payment_index)), | ^^ help: change this to: `m` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L157
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:157:61 | 157 | .map(|m| render::str_param("label", &m, payment_index)), | ^^ help: change this to: `m` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/zip321.rs#L151
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/zip321.rs:151:53 | 151 | .map(|m| render::memo_param(&m, payment_index)), | ^^ help: change this to: `m` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/welding_rig.rs#L70
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/welding_rig.rs:70:54 | 70 | let is_change = spent_from_accounts.contains(&account); | ^^^^^^^^ help: change this to: `account` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this `impl` can be derived: zcash_client_backend/src/wallet.rs#L18
warning: this `impl` can be derived --> zcash_client_backend/src/wallet.rs:18:1 | 18 | / impl Default for AccountId { 19 | | fn default() -> Self { 20 | | AccountId(0) 21 | | } 22 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `-W clippy::derivable-impls` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::derivable_impls)]` = help: remove the manual implementation... help: ...and instead derive it | 16 + #[derive(Default)] 17 | pub struct AccountId(pub u32); |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/keys.rs#L27
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/keys.rs:27:38 | 27 | &ExtendedSpendingKey::master(&seed), | ^^^^^ help: change this to: `seed` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
redundant closure: zcash_client_backend/src/encoding.rs#L33
warning: redundant closure --> zcash_client_backend/src/encoding.rs:33:47 | 33 | Vec::<u8>::from_base32(&data).map(|data| read(data)) | ^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `read` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `-W clippy::redundant-closure` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::redundant_closure)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_client_backend/src/data_api/wallet.rs#L225
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_client_backend/src/data_api/wallet.rs:225:77 | 225 | RecipientAddress::Transparent(to) => builder.add_transparent_output(&to, value), | ^^^ help: change this to: `to` | = 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)]`
the borrowed expression implements the required traits: zcash_proofs/src/lib.rs#L163
warning: the borrowed expression implements the required traits --> zcash_proofs/src/lib.rs:163:37 | 163 | VerifyingKey::<Bls12>::read(&mut fs) | ^^^^^^^ help: change this to: `fs` | = 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)]`
this expression borrows a value the compiler would automatically borrow: zcash_proofs/src/sapling/verifier.rs#L161
warning: this expression borrows a value the compiler would automatically borrow --> zcash_proofs/src/sapling/verifier.rs:161:9 | 161 | (&mut data_to_be_signed[32..64]).copy_from_slice(&sighash_value[..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_to_be_signed[32..64]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_proofs/src/sapling/verifier.rs#L62
warning: this expression borrows a value the compiler would automatically borrow --> zcash_proofs/src/sapling/verifier.rs:62:9 | 62 | (&mut data_to_be_signed[32..64]).copy_from_slice(&sighash_value[..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_to_be_signed[32..64]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_proofs/src/sapling/prover.rs#L247
warning: this expression borrows a value the compiler would automatically borrow --> zcash_proofs/src/sapling/prover.rs:247:9 | 247 | (&mut data_to_be_signed[32..64]).copy_from_slice(&sighash[..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_to_be_signed[32..64]` | = 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)]`
using `clone` on type `SubgroupPoint` which implements the `Copy` trait: zcash_proofs/src/sapling/prover.rs#L90
warning: using `clone` on type `SubgroupPoint` which implements the `Copy` trait --> zcash_proofs/src/sapling/prover.rs:90:23 | 90 | PublicKey(proof_generation_key.ak.clone().into()).randomize(ar, SPENDING_KEY_GENERATOR); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `proof_generation_key.ak` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `-W clippy::clone-on-copy` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::clone_on_copy)]`
dereferencing a tuple pattern where every element takes a reference: zcash_proofs/src/circuit/sprout/input.rs#L69
warning: dereferencing a tuple pattern where every element takes a reference --> zcash_proofs/src/circuit/sprout/input.rs:69:37 | 69 | layer.as_ref().map(|&(ref sibling, _)| &sibling[..]), | ^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrowed_reference = note: `-W clippy::needless-borrowed-reference` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrowed_reference)]` help: try removing the `&` and `ref` parts | 69 - layer.as_ref().map(|&(ref sibling, _)| &sibling[..]), 69 + layer.as_ref().map(|(sibling, _)| &sibling[..]), |
accessing first element with `chunk.get(0)`: zcash_proofs/src/circuit/ecc.rs#L39
warning: accessing first element with `chunk.get(0)` --> zcash_proofs/src/circuit/ecc.rs:39:23 | 39 | let chunk_a = chunk | _______________________^ 40 | | .get(0) | |___________________^ help: try: `chunk.first()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first = note: `-W clippy::get-first` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::get_first)]`
the borrowed expression implements the required traits: zcash_client_backend/build.rs#L5
warning: the borrowed expression implements the required traits --> zcash_client_backend/build.rs:5:19 | 5 | .includes(&["proto"]) | ^^^^^^^^^^ help: change this to: `["proto"]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
the borrowed expression implements the required traits: zcash_client_backend/build.rs#L4
warning: the borrowed expression implements the required traits --> zcash_client_backend/build.rs:4:17 | 4 | .inputs(&["proto/compact_formats.proto"]) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `["proto/compact_formats.proto"]` | = 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)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/extensions/transparent.rs#L150
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/extensions/transparent.rs:150:13 | 150 | &context, | ^^^^^^^^ help: change this to: `context` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value: zcash_primitives/src/zip32.rs#L87
warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value --> zcash_primitives/src/zip32.rs:87:17 | 87 | fn to_index(&self) -> u32 { | ^^^^^ | = help: consider choosing a less ambiguous name = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention = note: `-W clippy::wrong-self-convention` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::wrong_self_convention)]`
the borrowed expression implements the required traits: zcash_primitives/src/transaction/util/sha256d.rs#L59
warning: the borrowed expression implements the required traits --> zcash_primitives/src/transaction/util/sha256d.rs:59:28 | 59 | 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 = 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)]`
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/transaction/sighash.rs#L336
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/transaction/sighash.rs:336:17 | 336 | (&mut data) | ^^^^^^^^^^^ help: change this to: `data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/transaction/sighash.rs#L238
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/transaction/sighash.rs:238:9 | 238 | (&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
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/transaction/sighash.rs#L93
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/transaction/sighash.rs:93:9 | 93 | (&mut data) | ^^^^^^^^^^^ help: change this to: `data` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
name `PHGR` contains a capitalized acronym: zcash_primitives/src/transaction/components/sprout.rs#L17
warning: name `PHGR` contains a capitalized acronym --> zcash_primitives/src/transaction/components/sprout.rs:17:5 | 17 | PHGR([u8; PHGR_PROOF_SIZE]), | ^^^^ help: consider making the acronym lowercase, except the initial letter: `Phgr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms = note: `-W clippy::upper-case-acronyms` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::upper_case_acronyms)]`
manual `RangeInclusive::contains` implementation: zcash_primitives/src/transaction/components/amount.rs#L33
warning: manual `RangeInclusive::contains` implementation --> zcash_primitives/src/transaction/components/amount.rs:33:12 | 33 | 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)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/transaction/builder.rs#L323
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/transaction/builder.rs:323:50 | 323 | builder: Box::new(move |ctx| builder(&ctx).map(|x| x.to_payload())), | ^^^^ help: change this to: `ctx` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
use of `default` to create a unit struct: zcash_primitives/src/transaction/builder.rs#L146
warning: use of `default` to create a unit struct --> zcash_primitives/src/transaction/builder.rs:146:33 | 146 | _params: PhantomData::default(), | ^^^^^^^^^^^ help: remove this call to `default` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs = note: `-W clippy::default-constructed-unit-structs` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::default_constructed_unit_structs)]`
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/sapling.rs#L404
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/sapling.rs:404:9 | 404 | (&mut note_contents) | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `note_contents` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression borrows a value the compiler would automatically borrow: zcash_primitives/src/sapling.rs#L153
warning: this expression borrows a value the compiler would automatically borrow --> zcash_primitives/src/sapling.rs:153:5 | 153 | (&mut data_to_be_signed[32..64]).copy_from_slice(&sighash[..]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `data_to_be_signed[32..64]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the following explicit lifetimes could be elided: 'a: zcash_primitives/src/sapling/redjubjub.rs#L160
warning: the following explicit lifetimes could be elided: 'a --> zcash_primitives/src/sapling/redjubjub.rs:160:21 | 160 | pub fn batch_verify<'a, R: RngCore>( | ^^ 161 | mut rng: &mut R, 162 | batch: &[BatchEntry<'a>], | ^^ | = 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 | 160 ~ pub fn batch_verify<R: RngCore>( 161 | mut rng: &mut R, 162 ~ batch: &[BatchEntry<'_>], |
using `clone` on type `SubgroupPoint` which implements the `Copy` trait: zcash_primitives/src/sapling/prover.rs#L109
warning: using `clone` on type `SubgroupPoint` which implements the `Copy` trait --> zcash_primitives/src/sapling/prover.rs:109:32 | 109 | let rk = PublicKey(proof_generation_key.ak.clone().into()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `proof_generation_key.ak` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `-W clippy::clone-on-copy` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::clone_on_copy)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/pedersen_hash.rs#L90
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/pedersen_hash.rs:90:13 | 90 | &generators.next().expect("we don't have enough generators"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `generators.next().expect("we don't have enough generators")` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: zcash_primitives/src/sapling/pedersen_hash.rs#L41
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> zcash_primitives/src/sapling/pedersen_hash.rs:41:16 | 41 | .chain(bits.into_iter()); | ^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `bits` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/75b064d26970ca8e7a487072f51835ebb057d575/library/core/src/iter/traits/iterator.rs:524:12 = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `-W clippy::useless-conversion` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::useless_conversion)]`
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L414
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:414:13 | 414 | &ovk, | ^^^^ help: change this to: `ovk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L262
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:262:51 | 262 | sapling_parse_note_plaintext_without_memo(&self, plaintext, |diversifier| { | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/sapling/note_encryption.rs#L250
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/sapling/note_encryption.rs:250:51 | 250 | sapling_parse_note_plaintext_without_memo(&self, plaintext, |diversifier| { | ^^^^^ help: change this to: `self` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this `impl` can be derived: zcash_primitives/src/memo.rs#L175
warning: this `impl` can be derived --> zcash_primitives/src/memo.rs:175:1 | 175 | / impl Default for Memo { 176 | | fn default() -> Self { 177 | | Memo::Empty 178 | | } 179 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `-W clippy::derivable-impls` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::derivable_impls)]` = help: remove the manual implementation... help: ...and instead derive it... | 149 + #[derive(Default)] 150 | pub enum Memo { | help: ...and mark the default variant | 151 ~ #[default] 152 ~ Empty, |
this expression creates a reference which is immediately dereferenced by the compiler: zcash_primitives/src/block.rs#L33
warning: this expression creates a reference which is immediately dereferenced by the compiler --> zcash_primitives/src/block.rs:33:30 | 33 | hash.copy_from_slice(&bytes); | ^^^^^^ help: change this to: `bytes` | = 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)]`
variable does not need to be mutable: zcash_primitives/src/transaction/builder.rs#L850
warning: variable does not need to be mutable --> zcash_primitives/src/transaction/builder.rs:850:17 | 850 | let mut current = self.mtx.tze_inputs.get_mut(i).unwrap(); | ----^^^^^^^ | | | help: remove this `mut` | = note: `#[warn(unused_mut)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: components/equihash/src/verify.rs#L317
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/equihash/src/verify.rs:317:26 | 317 | Ok(Node::new(&p, &state, indices[0])) | ^^^^^^ help: change this to: `state` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/equihash/src/verify.rs#L317
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/equihash/src/verify.rs:317:22 | 317 | Ok(Node::new(&p, &state, indices[0])) | ^^ help: change this to: `p` | = 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)]`
usage of `mem::size_of::<T>()` to obtain the size of `T` in bits: components/equihash/src/verify.rs#L224
warning: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits --> components/equihash/src/verify.rs:224:23 | 224 | let len_indices = 8 * size_of::<u32>() * minimal.len() / (c_bit_len + 1); | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u32::BITS as usize` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits
usage of `mem::size_of::<T>()` to obtain the size of `T` in bits: components/equihash/src/verify.rs#L173
warning: usage of `mem::size_of::<T>()` to obtain the size of `T` in bits --> components/equihash/src/verify.rs:173:13 | 173 | assert!(8 * size_of::<u32>() >= 7 + bit_len); | ^^^^^^^^^^^^^^^^^^^^ help: consider using: `u32::BITS as usize` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_bits = note: `-W clippy::manual-bits` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::manual_bits)]`
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L461
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:461:31 | 461 | .open_to(&mut op, &out_ciphertext, &[], ock.as_ref(), &[0u8; 12]) | ^^^^^^^^^^^^^^^ help: change this to: `out_ciphertext` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L423
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:423:41 | 423 | let shared_secret = D::ka_agree_dec(&ivk, output.epk()); | ^^^^ help: change this to: `ivk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L392
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:392:57 | 392 | if D::epk_bytes(&D::ka_derive_public(&note, &derived_esk)) | ^^^^^^^^^^^^ help: change this to: `derived_esk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L392
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:392:50 | 392 | if D::epk_bytes(&D::ka_derive_public(&note, &derived_esk)) | ^^^^^ help: change this to: `note` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L391
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:391:28 | 391 | D::check_epk_bytes(&note, |derived_esk| { | ^^^^^ help: change this to: `note` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L387
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:387:56 | 387 | if D::ExtractedCommitmentBytes::try_from(D::cmstar(&note)) | ^^^^^ help: change this to: `note` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L373
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:373:72 | 373 | let (note, to) = domain.parse_note_plaintext_without_memo_ivk(ivk, &plaintext)?; | ^^^^^^^^^^ help: change this to: `plaintext` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L295
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:295:47 | 295 | let ock = D::derive_ock(ovk, &cv, &cmstar, &D::epk_bytes(&self.epk)); | ^^^^^^^ help: change this to: `cmstar` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: components/zcash_note_encryption/src/lib.rs#L295
warning: this expression creates a reference which is immediately dereferenced by the compiler --> components/zcash_note_encryption/src/lib.rs:295:42 | 295 | let ock = D::derive_ock(ovk, &cv, &cmstar, &D::epk_bytes(&self.epk)); | ^^^ help: change this to: `cv` | = 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)]`
Build target wasm32-wasi
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Build target wasm32-wasi
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Build target wasm32-wasi
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Build target wasm32-wasi
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Build target wasm32-wasi
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Build target wasm32-unknown-unknown
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Build target wasm32-unknown-unknown
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Build target wasm32-unknown-unknown
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Build target wasm32-unknown-unknown
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Build target wasm32-unknown-unknown
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Intra-doc links
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Intra-doc links
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Intra-doc links
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Intra-doc links
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Intra-doc links
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test on ubuntu-latest
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions/cache@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Test on ubuntu-latest
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test on ubuntu-latest
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test on ubuntu-latest
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test on ubuntu-latest
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Rustfmt
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Rustfmt
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Bitrot check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Bitrot check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Bitrot check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Bitrot check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Bitrot check
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test on macOS-latest
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Test on macOS-latest
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test on macOS-latest
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test on macOS-latest
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test on macOS-latest
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test on windows-latest
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Test on windows-latest
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test on windows-latest
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test on windows-latest
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Test on windows-latest
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Clippy (1.51.0)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Clippy (1.51.0)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Clippy (1.51.0)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Clippy (1.51.0)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Clippy (1.51.0)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Code coverage
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1, actions/cache@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Code coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Code coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Code coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Code coverage
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/