Update README and crate docs to state that this is a fork #29
ci.yml
on: push
Bitrot check
1m 23s
Clippy (1.56.1)
1m 23s
Clippy (beta)
53s
Code coverage
2m 18s
Intra-doc links
1m 24s
Rustfmt
1m 25s
Matrix: build
Matrix: test
Annotations
21 errors and 180 warnings
Test on ubuntu-latest
An error occurred trying to start process '/usr/bin/bash' with working directory '/home/runner/work/librustzcash/librustzcash/./zcash_proofs'. No such file or directory
|
Test on windows-latest
The job was canceled because "ubuntu-latest" failed.
|
Test on windows-latest
The operation was canceled.
|
Test on macOS-latest
The job was canceled because "ubuntu-latest" failed.
|
Test on macOS-latest
The operation was canceled.
|
failed to resolve: use of undeclared crate or module `jubjub`:
ironfish-primitives/benches/note_decryption.rs#L47
error[E0433]: failed to resolve: use of undeclared crate or module `jubjub`
--> ironfish-primitives/benches/note_decryption.rs:47:25
|
47 | randomness: jubjub::Fr::random(&mut rng),
| ^^^^^^ use of undeclared crate or module `jubjub`
|
help: consider importing this struct
|
1 + use ironfish_jubjub::Fr;
|
help: if you import `Fr`, refer to it directly
|
47 - randomness: jubjub::Fr::random(&mut rng),
47 + randomness: Fr::random(&mut rng),
|
|
failed to resolve: use of undeclared crate or module `jubjub`:
ironfish-primitives/benches/note_decryption.rs#L33
error[E0433]: failed to resolve: use of undeclared crate or module `jubjub`
--> ironfish-primitives/benches/note_decryption.rs:33:34
|
33 | let invalid_ivk = SaplingIvk(jubjub::Fr::random(&mut rng));
| ^^^^^^ use of undeclared crate or module `jubjub`
|
help: consider importing this struct
|
1 + use ironfish_jubjub::Fr;
|
help: if you import `Fr`, refer to it directly
|
33 - let invalid_ivk = SaplingIvk(jubjub::Fr::random(&mut rng));
33 + let invalid_ivk = SaplingIvk(Fr::random(&mut rng));
|
|
failed to resolve: use of undeclared crate or module `jubjub`:
ironfish-primitives/benches/note_decryption.rs#L32
error[E0433]: failed to resolve: use of undeclared crate or module `jubjub`
--> ironfish-primitives/benches/note_decryption.rs:32:32
|
32 | let valid_ivk = SaplingIvk(jubjub::Fr::random(&mut rng));
| ^^^^^^ use of undeclared crate or module `jubjub`
|
help: consider importing this struct
|
1 + use ironfish_jubjub::Fr;
|
help: if you import `Fr`, refer to it directly
|
32 - let valid_ivk = SaplingIvk(jubjub::Fr::random(&mut rng));
32 + let valid_ivk = SaplingIvk(Fr::random(&mut rng));
|
|
failed to resolve: use of undeclared crate or module `zcash_primitives`:
ironfish-primitives/benches/note_decryption.rs#L8
error[E0433]: failed to resolve: use of undeclared crate or module `zcash_primitives`
--> ironfish-primitives/benches/note_decryption.rs:8:5
|
8 | use zcash_primitives::{
| ^^^^^^^^^^^^^^^^ use of undeclared crate or module `zcash_primitives`
|
failed to resolve: use of undeclared crate or module `zcash_primitives`:
ironfish-primitives/benches/pedersen_hash.rs#L3
error[E0433]: failed to resolve: use of undeclared crate or module `zcash_primitives`
--> ironfish-primitives/benches/pedersen_hash.rs:3:5
|
3 | use zcash_primitives::sapling::pedersen_hash::{pedersen_hash, Personalization};
| ^^^^^^^^^^^^^^^^ use of undeclared crate or module `zcash_primitives`
|
Clippy (beta)
Clippy had exited with the 101 exit code
|
Build target wasm32-wasi
failed to select a version for the requirement `ahash = "^0.7"`
|
Build target wasm32-wasi
The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
|
Clippy (1.56.1)
Clippy had exited with the 101 exit code
|
Intra-doc links
failed to select a version for the requirement `ahash = "^0.7"`
|
Intra-doc links
The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
|
Bitrot check
failed to select a version for the requirement `ahash = "^0.7"`
|
Bitrot check
The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
|
Rustfmt
failed to select a version for the requirement `ahash = "^0.7"`
|
Rustfmt
The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
|
Code coverage
An error occurred trying to start process '/usr/bin/bash' with working directory '/home/runner/work/librustzcash/librustzcash/./zcash_proofs'. No such file or directory
|
Test on ubuntu-latest
The following actions uses node12 which is deprecated and will be forced to run on node16: 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 ubuntu-latest
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-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/
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/ivk.rs#L291
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/ivk.rs:291:23
|
291 | let encoded = vec![
| _______________________^
292 | | 0x12, 0x51, 0x37, 0xc7, 0xac, 0x8c, 0xd, 0x13, 0x3a, 0x5f, 0xc6, 0x84, 0x53, 0x90,
293 | | 0xf8, 0xe7, 0x23, 0x34, 0xfb, 0xda, 0x49, 0x3c, 0x87, 0x1c, 0x8f, 0x1a, 0xe1, 0x63,
294 | | 0xba, 0xdf, 0x77, 0x64, 0x43, 0xcf, 0xdc, 0x37, 0x1f, 0xd2, 0x89, 0x60, 0xe3, 0x77,
... |
297 | | 0xbd, 0xfe, 0xa4, 0xb7, 0x47, 0x20, 0x92, 0x6, 0xf0, 0x0, 0xf9, 0x64,
298 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
291 ~ let encoded = [0x12, 0x51, 0x37, 0xc7, 0xac, 0x8c, 0xd, 0x13, 0x3a, 0x5f, 0xc6, 0x84, 0x53, 0x90,
292 + 0xf8, 0xe7, 0x23, 0x34, 0xfb, 0xda, 0x49, 0x3c, 0x87, 0x1c, 0x8f, 0x1a, 0xe1, 0x63,
293 + 0xba, 0xdf, 0x77, 0x64, 0x43, 0xcf, 0xdc, 0x37, 0x1f, 0xd2, 0x89, 0x60, 0xe3, 0x77,
294 + 0x20, 0xd0, 0x1c, 0x5, 0x40, 0xe5, 0x43, 0x55, 0xc4, 0xe5, 0xf8, 0xaa, 0xe, 0x7a, 0xe7,
295 + 0x8c, 0x53, 0x15, 0xb8, 0x8f, 0x90, 0x14, 0x33, 0x30, 0x52, 0x2b, 0x8, 0x89, 0x90,
296 ~ 0xbd, 0xfe, 0xa4, 0xb7, 0x47, 0x20, 0x92, 0x6, 0xf0, 0x0, 0xf9, 0x64];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/ivk.rs#L264
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/ivk.rs:264:48
|
264 | let truncated_after_sapling_typecode = vec![
| ________________________________________________^
265 | | 0xf7, 0x3, 0xd8, 0xbe, 0x6a, 0x27, 0xfa, 0xa1, 0xd3, 0x11, 0xea, 0x25, 0x94, 0xe2, 0xb,
266 | | 0xde, 0xed, 0x6a, 0xaa, 0x8, 0x46, 0x7d, 0xe4, 0xb1, 0xe, 0xf1, 0xde, 0x61, 0xd7, 0x95,
267 | | 0xf7, 0x82, 0x62, 0x32, 0x7a, 0x73, 0x8c, 0x55, 0x93, 0xa1, 0x63, 0x75, 0xe2, 0xca,
268 | | 0xcb, 0x73, 0xd5, 0xe5, 0xa3, 0xbd, 0xb3, 0xf2, 0x26, 0xfa, 0x1c, 0xa2, 0xad, 0xb6,
269 | | 0xd8, 0x21, 0x5e, 0x8, 0xa, 0x82, 0x95, 0x21, 0x74,
270 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
264 ~ let truncated_after_sapling_typecode = [0xf7, 0x3, 0xd8, 0xbe, 0x6a, 0x27, 0xfa, 0xa1, 0xd3, 0x11, 0xea, 0x25, 0x94, 0xe2, 0xb,
265 + 0xde, 0xed, 0x6a, 0xaa, 0x8, 0x46, 0x7d, 0xe4, 0xb1, 0xe, 0xf1, 0xde, 0x61, 0xd7, 0x95,
266 + 0xf7, 0x82, 0x62, 0x32, 0x7a, 0x73, 0x8c, 0x55, 0x93, 0xa1, 0x63, 0x75, 0xe2, 0xca,
267 + 0xcb, 0x73, 0xd5, 0xe5, 0xa3, 0xbd, 0xb3, 0xf2, 0x26, 0xfa, 0x1c, 0xa2, 0xad, 0xb6,
268 ~ 0xd8, 0x21, 0x5e, 0x8, 0xa, 0x82, 0x95, 0x21, 0x74];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/ivk.rs#L245
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/ivk.rs:245:38
|
245 | let truncated_sapling_data = vec![
| ______________________________________^
246 | | 0xce, 0xbc, 0xfe, 0xc5, 0xef, 0x2d, 0xe, 0x66, 0xc2, 0x8c, 0x34, 0xdc, 0x2e, 0x24,
247 | | 0xd2, 0xc7, 0x4b, 0xac, 0x36, 0xe0, 0x43, 0x72, 0xa7, 0x33, 0xa4, 0xe, 0xe0, 0x52,
248 | | 0x15, 0x64, 0x66, 0x92, 0x36, 0xa7, 0x60, 0x8e, 0x48, 0xe8, 0xb0, 0x30, 0x4d, 0xcb,
... |
256 | | 0xf5, 0xd5, 0x8a, 0xb5, 0x1a,
257 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
245 ~ let truncated_sapling_data = [0xce, 0xbc, 0xfe, 0xc5, 0xef, 0x2d, 0xe, 0x66, 0xc2, 0x8c, 0x34, 0xdc, 0x2e, 0x24,
246 + 0xd2, 0xc7, 0x4b, 0xac, 0x36, 0xe0, 0x43, 0x72, 0xa7, 0x33, 0xa4, 0xe, 0xe0, 0x52,
247 + 0x15, 0x64, 0x66, 0x92, 0x36, 0xa7, 0x60, 0x8e, 0x48, 0xe8, 0xb0, 0x30, 0x4d, 0xcb,
248 + 0xd, 0x6f, 0x5, 0xd4, 0xb8, 0x72, 0x6a, 0xdc, 0x6c, 0x5c, 0xa, 0xf8, 0xdf, 0x95, 0x5a,
249 + 0xba, 0xe1, 0xaa, 0x82, 0x51, 0xe2, 0x70, 0x8d, 0x13, 0x16, 0x88, 0x6a, 0xc0, 0xc1,
250 + 0x99, 0x3c, 0xaf, 0x2c, 0x16, 0x54, 0x80, 0x7e, 0xb, 0xad, 0x31, 0x29, 0x26, 0xdd,
251 + 0x7a, 0x55, 0x98, 0x1, 0x18, 0xb, 0x14, 0x94, 0xb2, 0x6b, 0x81, 0x67, 0x73, 0xa6, 0xd0,
252 + 0x20, 0x94, 0x17, 0x3a, 0xf9, 0x98, 0x43, 0x58, 0xd6, 0x1, 0x10, 0x73, 0x32, 0xb4,
253 + 0x99, 0xad, 0x6b, 0xfe, 0xc0, 0x97, 0xaf, 0xd2, 0xee, 0x8, 0xe5, 0x83, 0x6b, 0xb6,
254 + 0xd9, 0x0, 0xef, 0x84, 0xff, 0xe8, 0x58, 0xba, 0xe8, 0x10, 0xea, 0x2d, 0xee, 0x72,
255 ~ 0xf5, 0xd5, 0x8a, 0xb5, 0x1a];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/ivk.rs#L222
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/ivk.rs:222:33
|
222 | let truncated_padding = vec![
| _________________________________^
223 | | 0x96, 0x73, 0x6a, 0x56, 0xbc, 0x44, 0x38, 0xe2, 0x47, 0x41, 0x1c, 0x70, 0xe4, 0x6,
224 | | 0x87, 0xbe, 0xb6, 0x90, 0xbd, 0xab, 0x1b, 0xd8, 0x27, 0x10, 0x0, 0x21, 0x30, 0x2, 0x77,
225 | | 0x87, 0x0, 0x25, 0x96, 0x94, 0x8f, 0x1e, 0x39, 0xd2, 0xd8, 0x65, 0xb4, 0x3c, 0x72,
... |
228 | | 0xf9, 0x65, 0x49, 0x14, 0xab, 0x7c, 0x55, 0x7b, 0x39, 0x47,
229 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
222 ~ let truncated_padding = [0x96, 0x73, 0x6a, 0x56, 0xbc, 0x44, 0x38, 0xe2, 0x47, 0x41, 0x1c, 0x70, 0xe4, 0x6,
223 + 0x87, 0xbe, 0xb6, 0x90, 0xbd, 0xab, 0x1b, 0xd8, 0x27, 0x10, 0x0, 0x21, 0x30, 0x2, 0x77,
224 + 0x87, 0x0, 0x25, 0x96, 0x94, 0x8f, 0x1e, 0x39, 0xd2, 0xd8, 0x65, 0xb4, 0x3c, 0x72,
225 + 0xd8, 0xac, 0xec, 0x5b, 0xa2, 0x18, 0x62, 0x3f, 0xb, 0x88, 0xb4, 0x41, 0xf1, 0x55,
226 + 0x39, 0x53, 0xbf, 0x2a, 0xd6, 0xcf, 0xdd, 0x46, 0xb7, 0xd8, 0xc1, 0x39, 0x34, 0x4d,
227 ~ 0xf9, 0x65, 0x49, 0x14, 0xab, 0x7c, 0x55, 0x7b, 0x39, 0x47];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/ivk.rs#L206
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/ivk.rs:206:31
|
206 | let invalid_padding = vec![
| _______________________________^
207 | | 0xba, 0xbc, 0xc0, 0x71, 0xcd, 0x3b, 0xfd, 0x9a, 0x32, 0x19, 0x7e, 0xeb, 0x8a, 0xa7,
208 | | 0x6e, 0xd4, 0xac, 0xcb, 0x59, 0xc2, 0x54, 0x26, 0xc6, 0xab, 0x71, 0xc7, 0xc3, 0x72,
209 | | 0xc, 0xa9, 0xad, 0xa4, 0xad, 0x8c, 0x9e, 0x35, 0x7b, 0x4c, 0x5d, 0xc7, 0x66, 0x12,
... |
212 | | 0x83, 0xe8, 0x92, 0x18, 0x28, 0x70, 0x1e, 0x81, 0x76, 0x56, 0xb6, 0x15,
213 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
206 ~ let invalid_padding = [0xba, 0xbc, 0xc0, 0x71, 0xcd, 0x3b, 0xfd, 0x9a, 0x32, 0x19, 0x7e, 0xeb, 0x8a, 0xa7,
207 + 0x6e, 0xd4, 0xac, 0xcb, 0x59, 0xc2, 0x54, 0x26, 0xc6, 0xab, 0x71, 0xc7, 0xc3, 0x72,
208 + 0xc, 0xa9, 0xad, 0xa4, 0xad, 0x8c, 0x9e, 0x35, 0x7b, 0x4c, 0x5d, 0xc7, 0x66, 0x12,
209 + 0x8a, 0xc5, 0x42, 0x89, 0xc1, 0x77, 0x32, 0xdc, 0xe8, 0x4b, 0x51, 0x31, 0x30, 0x3,
210 + 0x20, 0xe3, 0xb6, 0x8c, 0xbb, 0xab, 0xe8, 0x89, 0xf8, 0xed, 0xac, 0x6d, 0x8e, 0xb1,
211 ~ 0x83, 0xe8, 0x92, 0x18, 0x28, 0x70, 0x1e, 0x81, 0x76, 0x56, 0xb6, 0x15];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/fvk.rs#L309
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/fvk.rs:309:23
|
309 | let encoded = vec![
| _______________________^
310 | | 0xc4, 0x70, 0xc8, 0x7a, 0xcc, 0xe6, 0x6b, 0x1a, 0x62, 0xc7, 0xcd, 0x5f, 0x76, 0xd8,
311 | | 0xcc, 0x9c, 0x50, 0xbd, 0xce, 0x85, 0x80, 0xd7, 0x78, 0x25, 0x3e, 0x47, 0x9, 0x57,
312 | | 0x7d, 0x6a, 0xdb, 0x10, 0xb4, 0x11, 0x80, 0x13, 0x4c, 0x83, 0x76, 0xb4, 0x6b, 0xbd,
... |
315 | | 0xf4, 0xf5, 0x16, 0xef, 0x5c, 0xe0, 0x26, 0xbc, 0x23, 0x73, 0x76, 0x3f, 0x4b,
316 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
309 ~ let encoded = [0xc4, 0x70, 0xc8, 0x7a, 0xcc, 0xe6, 0x6b, 0x1a, 0x62, 0xc7, 0xcd, 0x5f, 0x76, 0xd8,
310 + 0xcc, 0x9c, 0x50, 0xbd, 0xce, 0x85, 0x80, 0xd7, 0x78, 0x25, 0x3e, 0x47, 0x9, 0x57,
311 + 0x7d, 0x6a, 0xdb, 0x10, 0xb4, 0x11, 0x80, 0x13, 0x4c, 0x83, 0x76, 0xb4, 0x6b, 0xbd,
312 + 0xef, 0x83, 0x5c, 0xa7, 0x68, 0xe6, 0xba, 0x41, 0x12, 0xbd, 0x43, 0x24, 0xf5, 0xaa,
313 + 0xa0, 0xf5, 0xf8, 0xe1, 0x59, 0xa0, 0x95, 0x85, 0x86, 0xf1, 0x9e, 0xcf, 0x8f, 0x94,
314 ~ 0xf4, 0xf5, 0x16, 0xef, 0x5c, 0xe0, 0x26, 0xbc, 0x23, 0x73, 0x76, 0x3f, 0x4b];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/fvk.rs#L279
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/fvk.rs:279:48
|
279 | let truncated_after_sapling_typecode = vec![
| ________________________________________________^
280 | | 0xac, 0x26, 0x5b, 0x19, 0x8f, 0x88, 0xb0, 0x7, 0xb3, 0x0, 0x91, 0x19, 0x52, 0xe1, 0x73,
281 | | 0x48, 0xff, 0x66, 0x7a, 0xef, 0xcf, 0x57, 0x9c, 0x65, 0xe4, 0x6a, 0x7a, 0x1d, 0x19,
282 | | 0x75, 0x6b, 0x43, 0xdd, 0xcf, 0xb9, 0x9a, 0xf3, 0x7a, 0xf8, 0xb, 0x23, 0x96, 0x64,
... |
286 | | 0x54, 0xd1, 0x9e, 0xec, 0x8b, 0xef, 0x35, 0xb8, 0x44, 0xdd, 0xab, 0x9a, 0x8d,
287 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
279 ~ let truncated_after_sapling_typecode = [0xac, 0x26, 0x5b, 0x19, 0x8f, 0x88, 0xb0, 0x7, 0xb3, 0x0, 0x91, 0x19, 0x52, 0xe1, 0x73,
280 + 0x48, 0xff, 0x66, 0x7a, 0xef, 0xcf, 0x57, 0x9c, 0x65, 0xe4, 0x6a, 0x7a, 0x1d, 0x19,
281 + 0x75, 0x6b, 0x43, 0xdd, 0xcf, 0xb9, 0x9a, 0xf3, 0x7a, 0xf8, 0xb, 0x23, 0x96, 0x64,
282 + 0x8c, 0x57, 0x56, 0x67, 0x9, 0x40, 0x35, 0xcb, 0xb1, 0xa4, 0x91, 0x4f, 0xdc, 0x39, 0x0,
283 + 0x98, 0x56, 0xa8, 0xf7, 0x25, 0x1a, 0xc8, 0xbc, 0xd7, 0xb3, 0xb0, 0xfa, 0x78, 0x6,
284 + 0xe8, 0x50, 0xfe, 0x92, 0xec, 0x5b, 0x1f, 0x74, 0xb9, 0xcf, 0x1f, 0x2e, 0x3b, 0x41,
285 ~ 0x54, 0xd1, 0x9e, 0xec, 0x8b, 0xef, 0x35, 0xb8, 0x44, 0xdd, 0xab, 0x9a, 0x8d];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/fvk.rs#L231
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/fvk.rs:231:33
|
231 | let truncated_padding = vec![
| _________________________________^
232 | | 0xdf, 0xea, 0x84, 0x55, 0xc3, 0x4a, 0x7c, 0x6e, 0x9f, 0x83, 0x3, 0x21, 0x14, 0xb0,
233 | | 0xcf, 0xb0, 0x60, 0x84, 0x75, 0x3a, 0xdc, 0xb9, 0x93, 0x16, 0xc0, 0x8f, 0x28, 0x5f,
234 | | 0x61, 0x5e, 0xf0, 0x8e, 0x44, 0xae, 0xa6, 0x74, 0xc5, 0x64, 0xad, 0xfa, 0xdc, 0x7d,
... |
239 | | 0x43, 0x8e, 0xc0, 0x3e, 0x9f, 0xf4, 0xf1, 0x80, 0x32, 0xcf, 0x2f, 0x7e, 0x7f, 0x91,
240 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
231 ~ let truncated_padding = [0xdf, 0xea, 0x84, 0x55, 0xc3, 0x4a, 0x7c, 0x6e, 0x9f, 0x83, 0x3, 0x21, 0x14, 0xb0,
232 + 0xcf, 0xb0, 0x60, 0x84, 0x75, 0x3a, 0xdc, 0xb9, 0x93, 0x16, 0xc0, 0x8f, 0x28, 0x5f,
233 + 0x61, 0x5e, 0xf0, 0x8e, 0x44, 0xae, 0xa6, 0x74, 0xc5, 0x64, 0xad, 0xfa, 0xdc, 0x7d,
234 + 0x64, 0x2a, 0x9, 0x47, 0x16, 0xf6, 0x5d, 0x8e, 0x46, 0xc4, 0xf0, 0x54, 0xfa, 0x5, 0x28,
235 + 0x1e, 0x3d, 0x7d, 0x37, 0xa5, 0x9f, 0x8b, 0x62, 0x78, 0xf6, 0x50, 0x18, 0x63, 0xe4,
236 + 0x51, 0x14, 0xae, 0x89, 0x41, 0x86, 0xd4, 0x9f, 0x10, 0x4b, 0x66, 0x2b, 0xf9, 0x46,
237 + 0x9c, 0xeb, 0xe8, 0x90, 0x8, 0xad, 0xd9, 0x6c, 0x6a, 0xf1, 0xed, 0xeb, 0x72, 0x44,
238 ~ 0x43, 0x8e, 0xc0, 0x3e, 0x9f, 0xf4, 0xf1, 0x80, 0x32, 0xcf, 0x2f, 0x7e, 0x7f, 0x91];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/fvk.rs#L213
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/fvk.rs:213:31
|
213 | let invalid_padding = vec![
| _______________________________^
214 | | 0x6b, 0x32, 0x44, 0xf1, 0xb, 0x67, 0xe9, 0x8f, 0x6, 0x57, 0xe3, 0x5, 0x17, 0xa0, 0x7,
215 | | 0x5c, 0xb0, 0xc9, 0x23, 0xcc, 0xb7, 0x54, 0xac, 0x55, 0x6a, 0x65, 0x99, 0x95, 0x32,
216 | | 0x97, 0xd5, 0x34, 0xa7, 0xc8, 0x6f, 0xc, 0xd7, 0x3b, 0xe0, 0x88, 0x19, 0xf3, 0x3e,
... |
221 | | 0xdf, 0x63, 0xe7, 0xef, 0x65, 0x6b, 0x18, 0x23, 0xf7, 0x3e, 0x35, 0x7c, 0xf3, 0xc4,
222 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
213 ~ let invalid_padding = [0x6b, 0x32, 0x44, 0xf1, 0xb, 0x67, 0xe9, 0x8f, 0x6, 0x57, 0xe3, 0x5, 0x17, 0xa0, 0x7,
214 + 0x5c, 0xb0, 0xc9, 0x23, 0xcc, 0xb7, 0x54, 0xac, 0x55, 0x6a, 0x65, 0x99, 0x95, 0x32,
215 + 0x97, 0xd5, 0x34, 0xa7, 0xc8, 0x6f, 0xc, 0xd7, 0x3b, 0xe0, 0x88, 0x19, 0xf3, 0x3e,
216 + 0x26, 0x19, 0xd6, 0x5f, 0x9a, 0x62, 0xc9, 0x6f, 0xad, 0x3b, 0xe5, 0xdd, 0xf1, 0xff,
217 + 0x5b, 0x4a, 0x13, 0x61, 0xc0, 0xd5, 0xa5, 0x87, 0xc5, 0x69, 0x48, 0xdb, 0x7e, 0xc6,
218 + 0x4e, 0xb0, 0x55, 0x41, 0x3f, 0xc0, 0x53, 0xbb, 0x79, 0x8b, 0x24, 0xa0, 0xfa, 0xd1,
219 + 0x6e, 0xea, 0x9, 0xea, 0xb3, 0xaf, 0x0, 0x7d, 0x86, 0x47, 0xdb, 0x8b, 0x38, 0xdd, 0x7b,
220 ~ 0xdf, 0x63, 0xe7, 0xef, 0x65, 0x6b, 0x18, 0x23, 0xf7, 0x3e, 0x35, 0x7c, 0xf3, 0xc4];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/address.rs#L299
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/address.rs:299:23
|
299 | let encoded = vec![
| _______________________^
300 | | 0xf0, 0x9e, 0x9d, 0x6e, 0xf5, 0xa6, 0xac, 0x16, 0x50, 0xf0, 0xdb, 0xe1, 0x2c, 0xa5,
301 | | 0x36, 0x22, 0xa2, 0x04, 0x89, 0x86, 0xe9, 0x6a, 0x9b, 0xf3, 0xff, 0x6d, 0x2f, 0xe6,
302 | | 0xea, 0xdb, 0xc5, 0x20, 0x62, 0xf9, 0x6f, 0xa9, 0x86, 0xcc,
303 | | ];
| |_________^
|
= 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
|
299 ~ let encoded = [0xf0, 0x9e, 0x9d, 0x6e, 0xf5, 0xa6, 0xac, 0x16, 0x50, 0xf0, 0xdb, 0xe1, 0x2c, 0xa5,
300 + 0x36, 0x22, 0xa2, 0x04, 0x89, 0x86, 0xe9, 0x6a, 0x9b, 0xf3, 0xff, 0x6d, 0x2f, 0xe6,
301 ~ 0xea, 0xdb, 0xc5, 0x20, 0x62, 0xf9, 0x6f, 0xa9, 0x86, 0xcc];
|
|
unused import: `group::GroupEncoding`:
ironfish-primitives/benches/note_decryption.rs#L5
warning: unused import: `group::GroupEncoding`
--> ironfish-primitives/benches/note_decryption.rs:5:5
|
5 | use group::GroupEncoding;
| ^^^^^^^^^^^^^^^^^^^^
|
unused import: `ff::Field`:
ironfish-primitives/benches/note_decryption.rs#L4
warning: unused import: `ff::Field`
--> ironfish-primitives/benches/note_decryption.rs:4:5
|
4 | use ff::Field;
| ^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
fields `root_seed`, `account`, and `diversifier_index` are never read:
components/zcash_address/src/kind/unified/address/test_vectors.rs#L9
warning: fields `root_seed`, `account`, and `diversifier_index` are never read
--> components/zcash_address/src/kind/unified/address/test_vectors.rs:9:9
|
1 | pub struct TestVector {
| ---------- fields in this struct
...
9 | pub root_seed: Vec<u8>,
| ^^^^^^^^^
10 | pub account: u32,
| ^^^^^^^
11 | pub diversifier_index: u32,
| ^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
the following explicit lifetimes could be elided: 'a:
ironfish-primitives/src/zip32.rs#L515
warning: the following explicit lifetimes could be elided: 'a
--> ironfish-primitives/src/zip32.rs:515:6
|
515 | impl<'a> From<&'a ExtendedSpendingKey> for ExtendedFullViewingKey {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
515 - impl<'a> From<&'a ExtendedSpendingKey> for ExtendedFullViewingKey {
515 + impl From<&ExtendedSpendingKey> for ExtendedFullViewingKey {
|
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/transaction/mod.rs#L718
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-primitives/src/transaction/mod.rs:718:18
|
718 | .zip(v_output_proofs.into_iter())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `v_output_proofs`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/transaction/mod.rs#L708
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-primitives/src/transaction/mod.rs:708:26
|
708 | .zip(v_spend_auth_sigs.into_iter()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `v_spend_auth_sigs`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
the borrowed expression implements the required traits:
ironfish-primitives/src/transaction/util/sha256d.rs#L63
warning: the borrowed expression implements the required traits
--> ironfish-primitives/src/transaction/util/sha256d.rs:63:28
|
63 | self.hasher.update(&buf);
| ^^^^ help: change this to: `buf`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/txid.rs#L516
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/txid.rs:516:9
|
516 | (&mut personal[..12]).copy_from_slice(ZCASH_AUTH_PERSONALIZATION_PREFIX);
| ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `personal[..12]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/txid.rs#L371
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/txid.rs:371:5
|
371 | (&mut personal[..12]).copy_from_slice(ZCASH_TX_PERSONALIZATION_PREFIX);
| ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `personal[..12]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/txid.rs#L90
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/txid.rs:90:9
|
90 | (&mut h).write_u32::<LittleEndian>(t_in.sequence).unwrap();
| ^^^^^^^^ help: change this to: `h`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/sighash_v4.rs#L255
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/sighash_v4.rs:255:21
|
255 | (&mut data)
| ^^^^^^^^^^^ help: change this to: `data`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/sighash_v4.rs#L148
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/sighash_v4.rs:148:9
|
148 | (&mut personal[..12]).copy_from_slice(ZCASH_SIGHASH_PERSONALIZATION_PREFIX);
| ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `personal[..12]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/sighash_v4.rs#L57
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/sighash_v4.rs:57:9
|
57 | (&mut data)
| ^^^^^^^^^^^ help: change this to: `data`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
the following explicit lifetimes could be elided: 'a:
ironfish-primitives/src/transaction/sighash.rs#L80
warning: the following explicit lifetimes could be elided: 'a
--> ironfish-primitives/src/transaction/sighash.rs:80:5
|
80 | 'a,
| ^^
...
86 | signable_input: &SignableInput<'a>,
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
80 ~ TA: TransparentAuthorizingContext,
81 | SA: sapling::Authorization<Proof = GrothProofBytes>,
...
84 | tx: &TransactionData<A>,
85 ~ signable_input: &SignableInput<'_>,
|
|
the following explicit lifetimes could be elided: 'a:
ironfish-primitives/src/transaction/sighash.rs#L41
warning: the following explicit lifetimes could be elided: 'a
--> ironfish-primitives/src/transaction/sighash.rs:41:6
|
41 | impl<'a> SignableInput<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
41 - impl<'a> SignableInput<'a> {
41 + impl SignableInput<'_> {
|
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/transaction/components/tze/builder.rs#L157
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-primitives/src/transaction/components/tze/builder.rs:157:22
|
157 | .zip(payloads.into_iter())
| ^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `payloads`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::iter::Zip<std::vec::IntoIter<transaction::components::tze::builder::TzeSigner<'_, transaction::TransactionData<transaction::Unauthorized>>>, std::slice::Iter<'_, transaction::components::tze::TzeIn<()>>>`:
ironfish-primitives/src/transaction/components/tze/builder.rs#L135
warning: useless conversion to the same type: `std::iter::Zip<std::vec::IntoIter<transaction::components::tze::builder::TzeSigner<'_, transaction::TransactionData<transaction::Unauthorized>>>, std::slice::Iter<'_, transaction::components::tze::TzeIn<()>>>`
--> ironfish-primitives/src/transaction/components/tze/builder.rs:135:24
|
135 | let payloads = signers
| ________________________^
136 | | .into_iter()
137 | | .zip(self.vin.iter())
138 | | .into_iter()
| |________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into_iter()`
|
135 ~ let payloads = signers
136 + .into_iter()
137 + .zip(self.vin.iter())
|
|
casting to the same type is unnecessary (`u8` -> `u8`):
ironfish-primitives/src/transaction/components/transparent/builder.rs#L248
warning: casting to the same type is unnecessary (`u8` -> `u8`)
--> ironfish-primitives/src/transaction/components/transparent/builder.rs:248:36
|
248 | sig_bytes.extend(&[SIGHASH_ALL as u8]);
| ^^^^^^^^^^^^^^^^^ help: try: `SIGHASH_ALL`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `-W clippy::unnecessary-cast` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_cast)]`
|
unneeded `return` statement:
ironfish-primitives/src/transaction/components/transparent/builder.rs#L210
warning: unneeded `return` statement
--> ironfish-primitives/src/transaction/components/transparent/builder.rs:210:9
|
210 | / return self
211 | | .inputs
212 | | .iter()
213 | | .map(|txin| txin.coin.script_pubkey.clone())
214 | | .collect();
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
210 ~ self
211 + .inputs
212 + .iter()
213 + .map(|txin| txin.coin.script_pubkey.clone())
214 ~ .collect()
|
|
unneeded `return` statement:
ironfish-primitives/src/transaction/components/transparent/builder.rs#L206
warning: unneeded `return` statement
--> ironfish-primitives/src/transaction/components/transparent/builder.rs:206:9
|
206 | return self.inputs.iter().map(|txin| txin.coin.value).collect();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `-W clippy::needless-return` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_return)]`
help: remove `return`
|
206 - return self.inputs.iter().map(|txin| txin.coin.value).collect();
206 + self.inputs.iter().map(|txin| txin.coin.value).collect()
|
|
usage of a legacy numeric constant:
ironfish-primitives/src/transaction/components/transparent/builder.rs#L187
warning: usage of a legacy numeric constant
--> ironfish-primitives/src/transaction/components/transparent/builder.rs:187:23
|
187 | sequence: std::u32::MAX,
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
187 | sequence: u32::MAX,
| ~~~~~~~~
|
the borrowed expression implements the required traits:
ironfish-primitives/src/transaction/components/transparent/builder.rs#L103
warning: the borrowed expression implements the required traits
--> ironfish-primitives/src/transaction/components/transparent/builder.rs:103:50
|
103 | if hash[..] != Ripemd160::digest(&Sha256::digest(&pubkey))[..] {
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `Sha256::digest(&pubkey)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `-W clippy::needless-borrows-for-generic-args` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_borrows_for_generic_args)]`
|
this let-binding has unit value:
ironfish-primitives/src/transaction/components/sapling/builder.rs#L608
warning: this let-binding has unit value
--> ironfish-primitives/src/transaction/components/sapling/builder.rs:608:13
|
608 | let mut ctx = prover.new_sapling_proving_context();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `-W clippy::let-unit-value` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::let_unit_value)]`
help: omit the `let` binding
|
608 | prover.new_sapling_proving_context();
|
help: variable `ctx` of type `()` can be replaced with explicit `()`
|
612 | &mut (),
| ~~
help: variable `ctx` of type `()` can be replaced with explicit `()`
|
620 | &mut (),
| ~~
|
usage of `Iterator::fold` on a type that implements `Try`:
ironfish-primitives/src/transaction/components/amount.rs#L205
warning: usage of `Iterator::fold` on a type that implements `Try`
--> ironfish-primitives/src/transaction/components/amount.rs:205:14
|
205 | iter.fold(Some(Amount::zero()), |acc, a| acc? + *a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(Amount::zero(), |acc, a| ...)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
|
usage of `Iterator::fold` on a type that implements `Try`:
ironfish-primitives/src/transaction/components/amount.rs#L199
warning: usage of `Iterator::fold` on a type that implements `Try`
--> ironfish-primitives/src/transaction/components/amount.rs:199:14
|
199 | iter.fold(Some(Amount::zero()), |acc, a| acc? + a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(Amount::zero(), |acc, a| ...)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
= note: `-W clippy::manual-try-fold` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::manual_try_fold)]`
|
manual `RangeInclusive::contains` implementation:
ironfish-primitives/src/transaction/components/amount.rs#L48
warning: manual `RangeInclusive::contains` implementation
--> ironfish-primitives/src/transaction/components/amount.rs:48:12
|
48 | if -MAX_MONEY <= amount && amount <= MAX_MONEY {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-MAX_MONEY..=MAX_MONEY).contains(&amount)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
= note: `-W clippy::manual-range-contains` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::manual_range_contains)]`
|
the following explicit lifetimes could be elided: 'a:
ironfish-primitives/src/transaction/builder.rs#L131
warning: the following explicit lifetimes could be elided: 'a
--> ironfish-primitives/src/transaction/builder.rs:131:6
|
131 | impl<'a, P: consensus::Parameters> Builder<'a, P, OsRng> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
131 - impl<'a, P: consensus::Parameters> Builder<'a, P, OsRng> {
131 + impl<P: consensus::Parameters> Builder<'_, P, OsRng> {
|
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/sapling.rs#L436
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/sapling.rs:436:9
|
436 | (&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:
ironfish-primitives/src/sapling.rs#L159
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/sapling.rs:159:5
|
159 | (&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)]`
|
the following explicit lifetimes could be elided: 'a:
ironfish-primitives/src/sapling/redjubjub.rs#L176
warning: the following explicit lifetimes could be elided: 'a
--> ironfish-primitives/src/sapling/redjubjub.rs:176:21
|
176 | pub fn batch_verify<'a, R: RngCore>(
| ^^
177 | mut rng: &mut R,
178 | 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
|
176 ~ pub fn batch_verify<R: RngCore>(
177 | mut rng: &mut R,
178 ~ batch: &[BatchEntry<'_>],
|
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/sapling/pedersen_hash.rs#L41
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-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/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:479:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/sapling/note_encryption.rs#L361
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-primitives/src/sapling/note_encryption.rs:361:18
|
361 | .zip(ephemeral_keys.into_iter())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `ephemeral_keys`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/sapling/note_encryption.rs#L340
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-primitives/src/sapling/note_encryption.rs:340:18
|
340 | .zip(ephemeral_keys.into_iter())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `ephemeral_keys`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::ops::Range<u8>`:
ironfish-primitives/src/merkle_tree.rs#L139
warning: useless conversion to the same type: `std::ops::Range<u8>`
--> ironfish-primitives/src/merkle_tree.rs:139:26
|
139 | parents: (1..DEPTH)
| __________________________^
140 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(1..DEPTH)`
|
= 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 `impl` can be derived:
ironfish-primitives/src/memo.rs#L175
warning: this `impl` can be derived
--> ironfish-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,
|
|
usage of a legacy numeric constant:
ironfish-primitives/src/consensus.rs#L612
warning: usage of a legacy numeric constant
--> ironfish-primitives/src/consensus.rs:612:44
|
612 | (lower.0..upper.map_or(std::u32::MAX, |u| u.0))
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
= note: `-W clippy::legacy-numeric-constants` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::legacy_numeric_constants)]`
help: use the associated constant instead
|
612 | (lower.0..upper.map_or(u32::MAX, |u| u.0))
| ~~~~~~~~
|
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)]`
|
manually reimplementing `div_ceil`:
components/f4jumble/src/lib.rs#L182
warning: manually reimplementing `div_ceil`
--> components/f4jumble/src/lib.rs:182:5
|
182 | (num + den - 1) / den
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `num.div_ceil(den)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil
= note: `-W clippy::manual-div-ceil` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::manual_div_ceil)]`
|
useless use of `vec!`:
ironfish-primitives/src/legacy.rs#L158
warning: useless use of `vec!`
--> ironfish-primitives/src/legacy.rs:158:30
|
158 | let short_data = vec![2; 100];
| ^^^^^^^^^^^^ help: you can use an array directly: `[2; 100]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
= note: `-W clippy::useless-vec` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::useless_vec)]`
|
the following explicit lifetimes could be elided: 'a:
ironfish-primitives/src/zip32.rs#L515
warning: the following explicit lifetimes could be elided: 'a
--> ironfish-primitives/src/zip32.rs:515:6
|
515 | impl<'a> From<&'a ExtendedSpendingKey> for ExtendedFullViewingKey {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
515 - impl<'a> From<&'a ExtendedSpendingKey> for ExtendedFullViewingKey {
515 + impl From<&ExtendedSpendingKey> for ExtendedFullViewingKey {
|
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/transaction/mod.rs#L718
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-primitives/src/transaction/mod.rs:718:18
|
718 | .zip(v_output_proofs.into_iter())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `v_output_proofs`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/transaction/mod.rs#L708
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-primitives/src/transaction/mod.rs:708:26
|
708 | .zip(v_spend_auth_sigs.into_iter()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `v_spend_auth_sigs`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
the borrowed expression implements the required traits:
ironfish-primitives/src/transaction/util/sha256d.rs#L63
warning: the borrowed expression implements the required traits
--> ironfish-primitives/src/transaction/util/sha256d.rs:63:28
|
63 | self.hasher.update(&buf);
| ^^^^ help: change this to: `buf`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/txid.rs#L516
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/txid.rs:516:9
|
516 | (&mut personal[..12]).copy_from_slice(ZCASH_AUTH_PERSONALIZATION_PREFIX);
| ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `personal[..12]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/txid.rs#L371
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/txid.rs:371:5
|
371 | (&mut personal[..12]).copy_from_slice(ZCASH_TX_PERSONALIZATION_PREFIX);
| ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `personal[..12]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/txid.rs#L90
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/txid.rs:90:9
|
90 | (&mut h).write_u32::<LittleEndian>(t_in.sequence).unwrap();
| ^^^^^^^^ help: change this to: `h`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/sighash_v4.rs#L255
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/sighash_v4.rs:255:21
|
255 | (&mut data)
| ^^^^^^^^^^^ help: change this to: `data`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/sighash_v4.rs#L148
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/sighash_v4.rs:148:9
|
148 | (&mut personal[..12]).copy_from_slice(ZCASH_SIGHASH_PERSONALIZATION_PREFIX);
| ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `personal[..12]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/sighash_v4.rs#L57
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/sighash_v4.rs:57:9
|
57 | (&mut data)
| ^^^^^^^^^^^ help: change this to: `data`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
the following explicit lifetimes could be elided: 'a:
ironfish-primitives/src/transaction/sighash.rs#L80
warning: the following explicit lifetimes could be elided: 'a
--> ironfish-primitives/src/transaction/sighash.rs:80:5
|
80 | 'a,
| ^^
...
86 | signable_input: &SignableInput<'a>,
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
80 ~ TA: TransparentAuthorizingContext,
81 | SA: sapling::Authorization<Proof = GrothProofBytes>,
...
84 | tx: &TransactionData<A>,
85 ~ signable_input: &SignableInput<'_>,
|
|
the following explicit lifetimes could be elided: 'a:
ironfish-primitives/src/transaction/sighash.rs#L41
warning: the following explicit lifetimes could be elided: 'a
--> ironfish-primitives/src/transaction/sighash.rs:41:6
|
41 | impl<'a> SignableInput<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
41 - impl<'a> SignableInput<'a> {
41 + impl SignableInput<'_> {
|
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/transaction/components/tze/builder.rs#L157
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-primitives/src/transaction/components/tze/builder.rs:157:22
|
157 | .zip(payloads.into_iter())
| ^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `payloads`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::iter::Zip<std::vec::IntoIter<transaction::components::tze::builder::TzeSigner<'_, transaction::TransactionData<transaction::Unauthorized>>>, std::slice::Iter<'_, transaction::components::tze::TzeIn<()>>>`:
ironfish-primitives/src/transaction/components/tze/builder.rs#L135
warning: useless conversion to the same type: `std::iter::Zip<std::vec::IntoIter<transaction::components::tze::builder::TzeSigner<'_, transaction::TransactionData<transaction::Unauthorized>>>, std::slice::Iter<'_, transaction::components::tze::TzeIn<()>>>`
--> ironfish-primitives/src/transaction/components/tze/builder.rs:135:24
|
135 | let payloads = signers
| ________________________^
136 | | .into_iter()
137 | | .zip(self.vin.iter())
138 | | .into_iter()
| |________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into_iter()`
|
135 ~ let payloads = signers
136 + .into_iter()
137 + .zip(self.vin.iter())
|
|
casting to the same type is unnecessary (`u8` -> `u8`):
ironfish-primitives/src/transaction/components/transparent/builder.rs#L248
warning: casting to the same type is unnecessary (`u8` -> `u8`)
--> ironfish-primitives/src/transaction/components/transparent/builder.rs:248:36
|
248 | sig_bytes.extend(&[SIGHASH_ALL as u8]);
| ^^^^^^^^^^^^^^^^^ help: try: `SIGHASH_ALL`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `-W clippy::unnecessary-cast` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_cast)]`
|
unneeded `return` statement:
ironfish-primitives/src/transaction/components/transparent/builder.rs#L210
warning: unneeded `return` statement
--> ironfish-primitives/src/transaction/components/transparent/builder.rs:210:9
|
210 | / return self
211 | | .inputs
212 | | .iter()
213 | | .map(|txin| txin.coin.script_pubkey.clone())
214 | | .collect();
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
210 ~ self
211 + .inputs
212 + .iter()
213 + .map(|txin| txin.coin.script_pubkey.clone())
214 ~ .collect()
|
|
unneeded `return` statement:
ironfish-primitives/src/transaction/components/transparent/builder.rs#L206
warning: unneeded `return` statement
--> ironfish-primitives/src/transaction/components/transparent/builder.rs:206:9
|
206 | return self.inputs.iter().map(|txin| txin.coin.value).collect();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
206 - return self.inputs.iter().map(|txin| txin.coin.value).collect();
206 + self.inputs.iter().map(|txin| txin.coin.value).collect()
|
|
usage of a legacy numeric constant:
ironfish-primitives/src/transaction/components/transparent/builder.rs#L187
warning: usage of a legacy numeric constant
--> ironfish-primitives/src/transaction/components/transparent/builder.rs:187:23
|
187 | sequence: std::u32::MAX,
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
187 | sequence: u32::MAX,
| ~~~~~~~~
|
the borrowed expression implements the required traits:
ironfish-primitives/src/transaction/components/transparent/builder.rs#L103
warning: the borrowed expression implements the required traits
--> ironfish-primitives/src/transaction/components/transparent/builder.rs:103:50
|
103 | if hash[..] != Ripemd160::digest(&Sha256::digest(&pubkey))[..] {
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `Sha256::digest(&pubkey)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `-W clippy::needless-borrows-for-generic-args` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_borrows_for_generic_args)]`
|
this let-binding has unit value:
ironfish-primitives/src/transaction/components/sapling/builder.rs#L608
warning: this let-binding has unit value
--> ironfish-primitives/src/transaction/components/sapling/builder.rs:608:13
|
608 | let mut ctx = prover.new_sapling_proving_context();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `-W clippy::let-unit-value` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::let_unit_value)]`
help: omit the `let` binding
|
608 | prover.new_sapling_proving_context();
|
help: variable `ctx` of type `()` can be replaced with explicit `()`
|
612 | &mut (),
| ~~
help: variable `ctx` of type `()` can be replaced with explicit `()`
|
620 | &mut (),
| ~~
|
usage of `Iterator::fold` on a type that implements `Try`:
ironfish-primitives/src/transaction/components/amount.rs#L205
warning: usage of `Iterator::fold` on a type that implements `Try`
--> ironfish-primitives/src/transaction/components/amount.rs:205:14
|
205 | iter.fold(Some(Amount::zero()), |acc, a| acc? + *a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(Amount::zero(), |acc, a| ...)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
|
usage of `Iterator::fold` on a type that implements `Try`:
ironfish-primitives/src/transaction/components/amount.rs#L199
warning: usage of `Iterator::fold` on a type that implements `Try`
--> ironfish-primitives/src/transaction/components/amount.rs:199:14
|
199 | iter.fold(Some(Amount::zero()), |acc, a| acc? + a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(Amount::zero(), |acc, a| ...)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
= note: `-W clippy::manual-try-fold` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::manual_try_fold)]`
|
manual `RangeInclusive::contains` implementation:
ironfish-primitives/src/transaction/components/amount.rs#L48
warning: manual `RangeInclusive::contains` implementation
--> ironfish-primitives/src/transaction/components/amount.rs:48:12
|
48 | if -MAX_MONEY <= amount && amount <= MAX_MONEY {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-MAX_MONEY..=MAX_MONEY).contains(&amount)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
= note: `-W clippy::manual-range-contains` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::manual_range_contains)]`
|
the following explicit lifetimes could be elided: 'a:
ironfish-primitives/src/transaction/builder.rs#L131
warning: the following explicit lifetimes could be elided: 'a
--> ironfish-primitives/src/transaction/builder.rs:131:6
|
131 | impl<'a, P: consensus::Parameters> Builder<'a, P, OsRng> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
131 - impl<'a, P: consensus::Parameters> Builder<'a, P, OsRng> {
131 + impl<P: consensus::Parameters> Builder<'_, P, OsRng> {
|
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/sapling.rs#L436
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/sapling.rs:436:9
|
436 | (&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:
ironfish-primitives/src/sapling.rs#L159
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/sapling.rs:159:5
|
159 | (&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)]`
|
the following explicit lifetimes could be elided: 'a:
ironfish-primitives/src/sapling/redjubjub.rs#L176
warning: the following explicit lifetimes could be elided: 'a
--> ironfish-primitives/src/sapling/redjubjub.rs:176:21
|
176 | pub fn batch_verify<'a, R: RngCore>(
| ^^
177 | mut rng: &mut R,
178 | 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
|
176 ~ pub fn batch_verify<R: RngCore>(
177 | mut rng: &mut R,
178 ~ batch: &[BatchEntry<'_>],
|
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/sapling/pedersen_hash.rs#L41
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-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/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:479:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/sapling/note_encryption.rs#L361
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-primitives/src/sapling/note_encryption.rs:361:18
|
361 | .zip(ephemeral_keys.into_iter())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `ephemeral_keys`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/sapling/note_encryption.rs#L340
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-primitives/src/sapling/note_encryption.rs:340:18
|
340 | .zip(ephemeral_keys.into_iter())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `ephemeral_keys`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
manually reimplementing `is_power_of_two`:
ironfish-primitives/src/merkle_tree.rs#L1206
warning: manually reimplementing `is_power_of_two`
--> ironfish-primitives/src/merkle_tree.rs:1206:31
|
1206 | let is_complete = n.count_ones() == 1;
| ^^^^^^^^^^^^^^^^^^^ help: consider using `.is_power_of_two()`: `n.is_power_of_two()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_power_of_two
= note: `-W clippy::manual-is-power-of-two` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::manual_is_power_of_two)]`
|
useless conversion to the same type: `std::ops::Range<u8>`:
ironfish-primitives/src/merkle_tree.rs#L139
warning: useless conversion to the same type: `std::ops::Range<u8>`
--> ironfish-primitives/src/merkle_tree.rs:139:26
|
139 | parents: (1..DEPTH)
| __________________________^
140 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(1..DEPTH)`
|
= 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 `impl` can be derived:
ironfish-primitives/src/memo.rs#L175
warning: this `impl` can be derived
--> ironfish-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,
|
|
usage of a legacy numeric method:
ironfish-primitives/src/constants.rs#L296
warning: usage of a legacy numeric method
--> ironfish-primitives/src/constants.rs:296:35
|
296 | assert!(tag[i] != u8::max_value());
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
296 | assert!(tag[i] != u8::MAX);
| ~~~
|
usage of a legacy numeric constant:
ironfish-primitives/src/consensus.rs#L612
warning: usage of a legacy numeric constant
--> ironfish-primitives/src/consensus.rs:612:44
|
612 | (lower.0..upper.map_or(std::u32::MAX, |u| u.0))
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
= note: `-W clippy::legacy-numeric-constants` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::legacy_numeric_constants)]`
help: use the associated constant instead
|
612 | (lower.0..upper.map_or(u32::MAX, |u| u.0))
| ~~~~~~~~
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/ivk.rs#L291
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/ivk.rs:291:23
|
291 | let encoded = vec![
| _______________________^
292 | | 0x12, 0x51, 0x37, 0xc7, 0xac, 0x8c, 0xd, 0x13, 0x3a, 0x5f, 0xc6, 0x84, 0x53, 0x90,
293 | | 0xf8, 0xe7, 0x23, 0x34, 0xfb, 0xda, 0x49, 0x3c, 0x87, 0x1c, 0x8f, 0x1a, 0xe1, 0x63,
294 | | 0xba, 0xdf, 0x77, 0x64, 0x43, 0xcf, 0xdc, 0x37, 0x1f, 0xd2, 0x89, 0x60, 0xe3, 0x77,
... |
297 | | 0xbd, 0xfe, 0xa4, 0xb7, 0x47, 0x20, 0x92, 0x6, 0xf0, 0x0, 0xf9, 0x64,
298 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
291 ~ let encoded = [0x12, 0x51, 0x37, 0xc7, 0xac, 0x8c, 0xd, 0x13, 0x3a, 0x5f, 0xc6, 0x84, 0x53, 0x90,
292 + 0xf8, 0xe7, 0x23, 0x34, 0xfb, 0xda, 0x49, 0x3c, 0x87, 0x1c, 0x8f, 0x1a, 0xe1, 0x63,
293 + 0xba, 0xdf, 0x77, 0x64, 0x43, 0xcf, 0xdc, 0x37, 0x1f, 0xd2, 0x89, 0x60, 0xe3, 0x77,
294 + 0x20, 0xd0, 0x1c, 0x5, 0x40, 0xe5, 0x43, 0x55, 0xc4, 0xe5, 0xf8, 0xaa, 0xe, 0x7a, 0xe7,
295 + 0x8c, 0x53, 0x15, 0xb8, 0x8f, 0x90, 0x14, 0x33, 0x30, 0x52, 0x2b, 0x8, 0x89, 0x90,
296 ~ 0xbd, 0xfe, 0xa4, 0xb7, 0x47, 0x20, 0x92, 0x6, 0xf0, 0x0, 0xf9, 0x64];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/ivk.rs#L264
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/ivk.rs:264:48
|
264 | let truncated_after_sapling_typecode = vec![
| ________________________________________________^
265 | | 0xf7, 0x3, 0xd8, 0xbe, 0x6a, 0x27, 0xfa, 0xa1, 0xd3, 0x11, 0xea, 0x25, 0x94, 0xe2, 0xb,
266 | | 0xde, 0xed, 0x6a, 0xaa, 0x8, 0x46, 0x7d, 0xe4, 0xb1, 0xe, 0xf1, 0xde, 0x61, 0xd7, 0x95,
267 | | 0xf7, 0x82, 0x62, 0x32, 0x7a, 0x73, 0x8c, 0x55, 0x93, 0xa1, 0x63, 0x75, 0xe2, 0xca,
268 | | 0xcb, 0x73, 0xd5, 0xe5, 0xa3, 0xbd, 0xb3, 0xf2, 0x26, 0xfa, 0x1c, 0xa2, 0xad, 0xb6,
269 | | 0xd8, 0x21, 0x5e, 0x8, 0xa, 0x82, 0x95, 0x21, 0x74,
270 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
264 ~ let truncated_after_sapling_typecode = [0xf7, 0x3, 0xd8, 0xbe, 0x6a, 0x27, 0xfa, 0xa1, 0xd3, 0x11, 0xea, 0x25, 0x94, 0xe2, 0xb,
265 + 0xde, 0xed, 0x6a, 0xaa, 0x8, 0x46, 0x7d, 0xe4, 0xb1, 0xe, 0xf1, 0xde, 0x61, 0xd7, 0x95,
266 + 0xf7, 0x82, 0x62, 0x32, 0x7a, 0x73, 0x8c, 0x55, 0x93, 0xa1, 0x63, 0x75, 0xe2, 0xca,
267 + 0xcb, 0x73, 0xd5, 0xe5, 0xa3, 0xbd, 0xb3, 0xf2, 0x26, 0xfa, 0x1c, 0xa2, 0xad, 0xb6,
268 ~ 0xd8, 0x21, 0x5e, 0x8, 0xa, 0x82, 0x95, 0x21, 0x74];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/ivk.rs#L245
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/ivk.rs:245:38
|
245 | let truncated_sapling_data = vec![
| ______________________________________^
246 | | 0xce, 0xbc, 0xfe, 0xc5, 0xef, 0x2d, 0xe, 0x66, 0xc2, 0x8c, 0x34, 0xdc, 0x2e, 0x24,
247 | | 0xd2, 0xc7, 0x4b, 0xac, 0x36, 0xe0, 0x43, 0x72, 0xa7, 0x33, 0xa4, 0xe, 0xe0, 0x52,
248 | | 0x15, 0x64, 0x66, 0x92, 0x36, 0xa7, 0x60, 0x8e, 0x48, 0xe8, 0xb0, 0x30, 0x4d, 0xcb,
... |
256 | | 0xf5, 0xd5, 0x8a, 0xb5, 0x1a,
257 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
245 ~ let truncated_sapling_data = [0xce, 0xbc, 0xfe, 0xc5, 0xef, 0x2d, 0xe, 0x66, 0xc2, 0x8c, 0x34, 0xdc, 0x2e, 0x24,
246 + 0xd2, 0xc7, 0x4b, 0xac, 0x36, 0xe0, 0x43, 0x72, 0xa7, 0x33, 0xa4, 0xe, 0xe0, 0x52,
247 + 0x15, 0x64, 0x66, 0x92, 0x36, 0xa7, 0x60, 0x8e, 0x48, 0xe8, 0xb0, 0x30, 0x4d, 0xcb,
248 + 0xd, 0x6f, 0x5, 0xd4, 0xb8, 0x72, 0x6a, 0xdc, 0x6c, 0x5c, 0xa, 0xf8, 0xdf, 0x95, 0x5a,
249 + 0xba, 0xe1, 0xaa, 0x82, 0x51, 0xe2, 0x70, 0x8d, 0x13, 0x16, 0x88, 0x6a, 0xc0, 0xc1,
250 + 0x99, 0x3c, 0xaf, 0x2c, 0x16, 0x54, 0x80, 0x7e, 0xb, 0xad, 0x31, 0x29, 0x26, 0xdd,
251 + 0x7a, 0x55, 0x98, 0x1, 0x18, 0xb, 0x14, 0x94, 0xb2, 0x6b, 0x81, 0x67, 0x73, 0xa6, 0xd0,
252 + 0x20, 0x94, 0x17, 0x3a, 0xf9, 0x98, 0x43, 0x58, 0xd6, 0x1, 0x10, 0x73, 0x32, 0xb4,
253 + 0x99, 0xad, 0x6b, 0xfe, 0xc0, 0x97, 0xaf, 0xd2, 0xee, 0x8, 0xe5, 0x83, 0x6b, 0xb6,
254 + 0xd9, 0x0, 0xef, 0x84, 0xff, 0xe8, 0x58, 0xba, 0xe8, 0x10, 0xea, 0x2d, 0xee, 0x72,
255 ~ 0xf5, 0xd5, 0x8a, 0xb5, 0x1a];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/ivk.rs#L222
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/ivk.rs:222:33
|
222 | let truncated_padding = vec![
| _________________________________^
223 | | 0x96, 0x73, 0x6a, 0x56, 0xbc, 0x44, 0x38, 0xe2, 0x47, 0x41, 0x1c, 0x70, 0xe4, 0x6,
224 | | 0x87, 0xbe, 0xb6, 0x90, 0xbd, 0xab, 0x1b, 0xd8, 0x27, 0x10, 0x0, 0x21, 0x30, 0x2, 0x77,
225 | | 0x87, 0x0, 0x25, 0x96, 0x94, 0x8f, 0x1e, 0x39, 0xd2, 0xd8, 0x65, 0xb4, 0x3c, 0x72,
... |
228 | | 0xf9, 0x65, 0x49, 0x14, 0xab, 0x7c, 0x55, 0x7b, 0x39, 0x47,
229 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
222 ~ let truncated_padding = [0x96, 0x73, 0x6a, 0x56, 0xbc, 0x44, 0x38, 0xe2, 0x47, 0x41, 0x1c, 0x70, 0xe4, 0x6,
223 + 0x87, 0xbe, 0xb6, 0x90, 0xbd, 0xab, 0x1b, 0xd8, 0x27, 0x10, 0x0, 0x21, 0x30, 0x2, 0x77,
224 + 0x87, 0x0, 0x25, 0x96, 0x94, 0x8f, 0x1e, 0x39, 0xd2, 0xd8, 0x65, 0xb4, 0x3c, 0x72,
225 + 0xd8, 0xac, 0xec, 0x5b, 0xa2, 0x18, 0x62, 0x3f, 0xb, 0x88, 0xb4, 0x41, 0xf1, 0x55,
226 + 0x39, 0x53, 0xbf, 0x2a, 0xd6, 0xcf, 0xdd, 0x46, 0xb7, 0xd8, 0xc1, 0x39, 0x34, 0x4d,
227 ~ 0xf9, 0x65, 0x49, 0x14, 0xab, 0x7c, 0x55, 0x7b, 0x39, 0x47];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/ivk.rs#L206
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/ivk.rs:206:31
|
206 | let invalid_padding = vec![
| _______________________________^
207 | | 0xba, 0xbc, 0xc0, 0x71, 0xcd, 0x3b, 0xfd, 0x9a, 0x32, 0x19, 0x7e, 0xeb, 0x8a, 0xa7,
208 | | 0x6e, 0xd4, 0xac, 0xcb, 0x59, 0xc2, 0x54, 0x26, 0xc6, 0xab, 0x71, 0xc7, 0xc3, 0x72,
209 | | 0xc, 0xa9, 0xad, 0xa4, 0xad, 0x8c, 0x9e, 0x35, 0x7b, 0x4c, 0x5d, 0xc7, 0x66, 0x12,
... |
212 | | 0x83, 0xe8, 0x92, 0x18, 0x28, 0x70, 0x1e, 0x81, 0x76, 0x56, 0xb6, 0x15,
213 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
206 ~ let invalid_padding = [0xba, 0xbc, 0xc0, 0x71, 0xcd, 0x3b, 0xfd, 0x9a, 0x32, 0x19, 0x7e, 0xeb, 0x8a, 0xa7,
207 + 0x6e, 0xd4, 0xac, 0xcb, 0x59, 0xc2, 0x54, 0x26, 0xc6, 0xab, 0x71, 0xc7, 0xc3, 0x72,
208 + 0xc, 0xa9, 0xad, 0xa4, 0xad, 0x8c, 0x9e, 0x35, 0x7b, 0x4c, 0x5d, 0xc7, 0x66, 0x12,
209 + 0x8a, 0xc5, 0x42, 0x89, 0xc1, 0x77, 0x32, 0xdc, 0xe8, 0x4b, 0x51, 0x31, 0x30, 0x3,
210 + 0x20, 0xe3, 0xb6, 0x8c, 0xbb, 0xab, 0xe8, 0x89, 0xf8, 0xed, 0xac, 0x6d, 0x8e, 0xb1,
211 ~ 0x83, 0xe8, 0x92, 0x18, 0x28, 0x70, 0x1e, 0x81, 0x76, 0x56, 0xb6, 0x15];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/fvk.rs#L309
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/fvk.rs:309:23
|
309 | let encoded = vec![
| _______________________^
310 | | 0xc4, 0x70, 0xc8, 0x7a, 0xcc, 0xe6, 0x6b, 0x1a, 0x62, 0xc7, 0xcd, 0x5f, 0x76, 0xd8,
311 | | 0xcc, 0x9c, 0x50, 0xbd, 0xce, 0x85, 0x80, 0xd7, 0x78, 0x25, 0x3e, 0x47, 0x9, 0x57,
312 | | 0x7d, 0x6a, 0xdb, 0x10, 0xb4, 0x11, 0x80, 0x13, 0x4c, 0x83, 0x76, 0xb4, 0x6b, 0xbd,
... |
315 | | 0xf4, 0xf5, 0x16, 0xef, 0x5c, 0xe0, 0x26, 0xbc, 0x23, 0x73, 0x76, 0x3f, 0x4b,
316 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
309 ~ let encoded = [0xc4, 0x70, 0xc8, 0x7a, 0xcc, 0xe6, 0x6b, 0x1a, 0x62, 0xc7, 0xcd, 0x5f, 0x76, 0xd8,
310 + 0xcc, 0x9c, 0x50, 0xbd, 0xce, 0x85, 0x80, 0xd7, 0x78, 0x25, 0x3e, 0x47, 0x9, 0x57,
311 + 0x7d, 0x6a, 0xdb, 0x10, 0xb4, 0x11, 0x80, 0x13, 0x4c, 0x83, 0x76, 0xb4, 0x6b, 0xbd,
312 + 0xef, 0x83, 0x5c, 0xa7, 0x68, 0xe6, 0xba, 0x41, 0x12, 0xbd, 0x43, 0x24, 0xf5, 0xaa,
313 + 0xa0, 0xf5, 0xf8, 0xe1, 0x59, 0xa0, 0x95, 0x85, 0x86, 0xf1, 0x9e, 0xcf, 0x8f, 0x94,
314 ~ 0xf4, 0xf5, 0x16, 0xef, 0x5c, 0xe0, 0x26, 0xbc, 0x23, 0x73, 0x76, 0x3f, 0x4b];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/fvk.rs#L279
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/fvk.rs:279:48
|
279 | let truncated_after_sapling_typecode = vec![
| ________________________________________________^
280 | | 0xac, 0x26, 0x5b, 0x19, 0x8f, 0x88, 0xb0, 0x7, 0xb3, 0x0, 0x91, 0x19, 0x52, 0xe1, 0x73,
281 | | 0x48, 0xff, 0x66, 0x7a, 0xef, 0xcf, 0x57, 0x9c, 0x65, 0xe4, 0x6a, 0x7a, 0x1d, 0x19,
282 | | 0x75, 0x6b, 0x43, 0xdd, 0xcf, 0xb9, 0x9a, 0xf3, 0x7a, 0xf8, 0xb, 0x23, 0x96, 0x64,
... |
286 | | 0x54, 0xd1, 0x9e, 0xec, 0x8b, 0xef, 0x35, 0xb8, 0x44, 0xdd, 0xab, 0x9a, 0x8d,
287 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
279 ~ let truncated_after_sapling_typecode = [0xac, 0x26, 0x5b, 0x19, 0x8f, 0x88, 0xb0, 0x7, 0xb3, 0x0, 0x91, 0x19, 0x52, 0xe1, 0x73,
280 + 0x48, 0xff, 0x66, 0x7a, 0xef, 0xcf, 0x57, 0x9c, 0x65, 0xe4, 0x6a, 0x7a, 0x1d, 0x19,
281 + 0x75, 0x6b, 0x43, 0xdd, 0xcf, 0xb9, 0x9a, 0xf3, 0x7a, 0xf8, 0xb, 0x23, 0x96, 0x64,
282 + 0x8c, 0x57, 0x56, 0x67, 0x9, 0x40, 0x35, 0xcb, 0xb1, 0xa4, 0x91, 0x4f, 0xdc, 0x39, 0x0,
283 + 0x98, 0x56, 0xa8, 0xf7, 0x25, 0x1a, 0xc8, 0xbc, 0xd7, 0xb3, 0xb0, 0xfa, 0x78, 0x6,
284 + 0xe8, 0x50, 0xfe, 0x92, 0xec, 0x5b, 0x1f, 0x74, 0xb9, 0xcf, 0x1f, 0x2e, 0x3b, 0x41,
285 ~ 0x54, 0xd1, 0x9e, 0xec, 0x8b, 0xef, 0x35, 0xb8, 0x44, 0xdd, 0xab, 0x9a, 0x8d];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/fvk.rs#L231
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/fvk.rs:231:33
|
231 | let truncated_padding = vec![
| _________________________________^
232 | | 0xdf, 0xea, 0x84, 0x55, 0xc3, 0x4a, 0x7c, 0x6e, 0x9f, 0x83, 0x3, 0x21, 0x14, 0xb0,
233 | | 0xcf, 0xb0, 0x60, 0x84, 0x75, 0x3a, 0xdc, 0xb9, 0x93, 0x16, 0xc0, 0x8f, 0x28, 0x5f,
234 | | 0x61, 0x5e, 0xf0, 0x8e, 0x44, 0xae, 0xa6, 0x74, 0xc5, 0x64, 0xad, 0xfa, 0xdc, 0x7d,
... |
239 | | 0x43, 0x8e, 0xc0, 0x3e, 0x9f, 0xf4, 0xf1, 0x80, 0x32, 0xcf, 0x2f, 0x7e, 0x7f, 0x91,
240 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
231 ~ let truncated_padding = [0xdf, 0xea, 0x84, 0x55, 0xc3, 0x4a, 0x7c, 0x6e, 0x9f, 0x83, 0x3, 0x21, 0x14, 0xb0,
232 + 0xcf, 0xb0, 0x60, 0x84, 0x75, 0x3a, 0xdc, 0xb9, 0x93, 0x16, 0xc0, 0x8f, 0x28, 0x5f,
233 + 0x61, 0x5e, 0xf0, 0x8e, 0x44, 0xae, 0xa6, 0x74, 0xc5, 0x64, 0xad, 0xfa, 0xdc, 0x7d,
234 + 0x64, 0x2a, 0x9, 0x47, 0x16, 0xf6, 0x5d, 0x8e, 0x46, 0xc4, 0xf0, 0x54, 0xfa, 0x5, 0x28,
235 + 0x1e, 0x3d, 0x7d, 0x37, 0xa5, 0x9f, 0x8b, 0x62, 0x78, 0xf6, 0x50, 0x18, 0x63, 0xe4,
236 + 0x51, 0x14, 0xae, 0x89, 0x41, 0x86, 0xd4, 0x9f, 0x10, 0x4b, 0x66, 0x2b, 0xf9, 0x46,
237 + 0x9c, 0xeb, 0xe8, 0x90, 0x8, 0xad, 0xd9, 0x6c, 0x6a, 0xf1, 0xed, 0xeb, 0x72, 0x44,
238 ~ 0x43, 0x8e, 0xc0, 0x3e, 0x9f, 0xf4, 0xf1, 0x80, 0x32, 0xcf, 0x2f, 0x7e, 0x7f, 0x91];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/fvk.rs#L213
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/fvk.rs:213:31
|
213 | let invalid_padding = vec![
| _______________________________^
214 | | 0x6b, 0x32, 0x44, 0xf1, 0xb, 0x67, 0xe9, 0x8f, 0x6, 0x57, 0xe3, 0x5, 0x17, 0xa0, 0x7,
215 | | 0x5c, 0xb0, 0xc9, 0x23, 0xcc, 0xb7, 0x54, 0xac, 0x55, 0x6a, 0x65, 0x99, 0x95, 0x32,
216 | | 0x97, 0xd5, 0x34, 0xa7, 0xc8, 0x6f, 0xc, 0xd7, 0x3b, 0xe0, 0x88, 0x19, 0xf3, 0x3e,
... |
221 | | 0xdf, 0x63, 0xe7, 0xef, 0x65, 0x6b, 0x18, 0x23, 0xf7, 0x3e, 0x35, 0x7c, 0xf3, 0xc4,
222 | | ];
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
help: you can use an array directly
|
213 ~ let invalid_padding = [0x6b, 0x32, 0x44, 0xf1, 0xb, 0x67, 0xe9, 0x8f, 0x6, 0x57, 0xe3, 0x5, 0x17, 0xa0, 0x7,
214 + 0x5c, 0xb0, 0xc9, 0x23, 0xcc, 0xb7, 0x54, 0xac, 0x55, 0x6a, 0x65, 0x99, 0x95, 0x32,
215 + 0x97, 0xd5, 0x34, 0xa7, 0xc8, 0x6f, 0xc, 0xd7, 0x3b, 0xe0, 0x88, 0x19, 0xf3, 0x3e,
216 + 0x26, 0x19, 0xd6, 0x5f, 0x9a, 0x62, 0xc9, 0x6f, 0xad, 0x3b, 0xe5, 0xdd, 0xf1, 0xff,
217 + 0x5b, 0x4a, 0x13, 0x61, 0xc0, 0xd5, 0xa5, 0x87, 0xc5, 0x69, 0x48, 0xdb, 0x7e, 0xc6,
218 + 0x4e, 0xb0, 0x55, 0x41, 0x3f, 0xc0, 0x53, 0xbb, 0x79, 0x8b, 0x24, 0xa0, 0xfa, 0xd1,
219 + 0x6e, 0xea, 0x9, 0xea, 0xb3, 0xaf, 0x0, 0x7d, 0x86, 0x47, 0xdb, 0x8b, 0x38, 0xdd, 0x7b,
220 ~ 0xdf, 0x63, 0xe7, 0xef, 0x65, 0x6b, 0x18, 0x23, 0xf7, 0x3e, 0x35, 0x7c, 0xf3, 0xc4];
|
|
useless use of `vec!`:
components/zcash_address/src/kind/unified/address.rs#L299
warning: useless use of `vec!`
--> components/zcash_address/src/kind/unified/address.rs:299:23
|
299 | let encoded = vec![
| _______________________^
300 | | 0xf0, 0x9e, 0x9d, 0x6e, 0xf5, 0xa6, 0xac, 0x16, 0x50, 0xf0, 0xdb, 0xe1, 0x2c, 0xa5,
301 | | 0x36, 0x22, 0xa2, 0x04, 0x89, 0x86, 0xe9, 0x6a, 0x9b, 0xf3, 0xff, 0x6d, 0x2f, 0xe6,
302 | | 0xea, 0xdb, 0xc5, 0x20, 0x62, 0xf9, 0x6f, 0xa9, 0x86, 0xcc,
303 | | ];
| |_________^
|
= 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
|
299 ~ let encoded = [0xf0, 0x9e, 0x9d, 0x6e, 0xf5, 0xa6, 0xac, 0x16, 0x50, 0xf0, 0xdb, 0xe1, 0x2c, 0xa5,
300 + 0x36, 0x22, 0xa2, 0x04, 0x89, 0x86, 0xe9, 0x6a, 0x9b, 0xf3, 0xff, 0x6d, 0x2f, 0xe6,
301 ~ 0xea, 0xdb, 0xc5, 0x20, 0x62, 0xf9, 0x6f, 0xa9, 0x86, 0xcc];
|
|
fields `root_seed`, `account`, and `diversifier_index` are never read:
components/zcash_address/src/kind/unified/address/test_vectors.rs#L9
warning: fields `root_seed`, `account`, and `diversifier_index` are never read
--> components/zcash_address/src/kind/unified/address/test_vectors.rs:9:9
|
1 | pub struct TestVector {
| ---------- fields in this struct
...
9 | pub root_seed: Vec<u8>,
| ^^^^^^^^^
10 | pub account: u32,
| ^^^^^^^
11 | pub diversifier_index: u32,
| ^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
the following explicit lifetimes could be elided: 'a:
ironfish-primitives/src/zip32.rs#L515
warning: the following explicit lifetimes could be elided: 'a
--> ironfish-primitives/src/zip32.rs:515:6
|
515 | impl<'a> From<&'a ExtendedSpendingKey> for ExtendedFullViewingKey {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
515 - impl<'a> From<&'a ExtendedSpendingKey> for ExtendedFullViewingKey {
515 + impl From<&ExtendedSpendingKey> for ExtendedFullViewingKey {
|
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/transaction/mod.rs#L718
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-primitives/src/transaction/mod.rs:718:18
|
718 | .zip(v_output_proofs.into_iter())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `v_output_proofs`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/transaction/mod.rs#L708
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-primitives/src/transaction/mod.rs:708:26
|
708 | .zip(v_spend_auth_sigs.into_iter()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `v_spend_auth_sigs`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
the borrowed expression implements the required traits:
ironfish-primitives/src/transaction/util/sha256d.rs#L63
warning: the borrowed expression implements the required traits
--> ironfish-primitives/src/transaction/util/sha256d.rs:63:28
|
63 | self.hasher.update(&buf);
| ^^^^ help: change this to: `buf`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/txid.rs#L516
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/txid.rs:516:9
|
516 | (&mut personal[..12]).copy_from_slice(ZCASH_AUTH_PERSONALIZATION_PREFIX);
| ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `personal[..12]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/txid.rs#L371
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/txid.rs:371:5
|
371 | (&mut personal[..12]).copy_from_slice(ZCASH_TX_PERSONALIZATION_PREFIX);
| ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `personal[..12]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/txid.rs#L90
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/txid.rs:90:9
|
90 | (&mut h).write_u32::<LittleEndian>(t_in.sequence).unwrap();
| ^^^^^^^^ help: change this to: `h`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/sighash_v4.rs#L255
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/sighash_v4.rs:255:21
|
255 | (&mut data)
| ^^^^^^^^^^^ help: change this to: `data`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/sighash_v4.rs#L148
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/sighash_v4.rs:148:9
|
148 | (&mut personal[..12]).copy_from_slice(ZCASH_SIGHASH_PERSONALIZATION_PREFIX);
| ^^^^^^^^^^^^^^^^^^^^^ help: change this to: `personal[..12]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/transaction/sighash_v4.rs#L57
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/transaction/sighash_v4.rs:57:9
|
57 | (&mut data)
| ^^^^^^^^^^^ help: change this to: `data`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
the following explicit lifetimes could be elided: 'a:
ironfish-primitives/src/transaction/sighash.rs#L80
warning: the following explicit lifetimes could be elided: 'a
--> ironfish-primitives/src/transaction/sighash.rs:80:5
|
80 | 'a,
| ^^
...
86 | signable_input: &SignableInput<'a>,
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
80 ~ TA: TransparentAuthorizingContext,
81 | SA: sapling::Authorization<Proof = GrothProofBytes>,
...
84 | tx: &TransactionData<A>,
85 ~ signable_input: &SignableInput<'_>,
|
|
the following explicit lifetimes could be elided: 'a:
ironfish-primitives/src/transaction/sighash.rs#L41
warning: the following explicit lifetimes could be elided: 'a
--> ironfish-primitives/src/transaction/sighash.rs:41:6
|
41 | impl<'a> SignableInput<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
41 - impl<'a> SignableInput<'a> {
41 + impl SignableInput<'_> {
|
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/transaction/components/tze/builder.rs#L157
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-primitives/src/transaction/components/tze/builder.rs:157:22
|
157 | .zip(payloads.into_iter())
| ^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `payloads`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::iter::Zip<std::vec::IntoIter<transaction::components::tze::builder::TzeSigner<'_, transaction::TransactionData<transaction::Unauthorized>>>, std::slice::Iter<'_, transaction::components::tze::TzeIn<()>>>`:
ironfish-primitives/src/transaction/components/tze/builder.rs#L135
warning: useless conversion to the same type: `std::iter::Zip<std::vec::IntoIter<transaction::components::tze::builder::TzeSigner<'_, transaction::TransactionData<transaction::Unauthorized>>>, std::slice::Iter<'_, transaction::components::tze::TzeIn<()>>>`
--> ironfish-primitives/src/transaction/components/tze/builder.rs:135:24
|
135 | let payloads = signers
| ________________________^
136 | | .into_iter()
137 | | .zip(self.vin.iter())
138 | | .into_iter()
| |________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into_iter()`
|
135 ~ let payloads = signers
136 + .into_iter()
137 + .zip(self.vin.iter())
|
|
casting to the same type is unnecessary (`u8` -> `u8`):
ironfish-primitives/src/transaction/components/transparent/builder.rs#L248
warning: casting to the same type is unnecessary (`u8` -> `u8`)
--> ironfish-primitives/src/transaction/components/transparent/builder.rs:248:36
|
248 | sig_bytes.extend(&[SIGHASH_ALL as u8]);
| ^^^^^^^^^^^^^^^^^ help: try: `SIGHASH_ALL`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `-W clippy::unnecessary-cast` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::unnecessary_cast)]`
|
unneeded `return` statement:
ironfish-primitives/src/transaction/components/transparent/builder.rs#L210
warning: unneeded `return` statement
--> ironfish-primitives/src/transaction/components/transparent/builder.rs:210:9
|
210 | / return self
211 | | .inputs
212 | | .iter()
213 | | .map(|txin| txin.coin.script_pubkey.clone())
214 | | .collect();
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
210 ~ self
211 + .inputs
212 + .iter()
213 + .map(|txin| txin.coin.script_pubkey.clone())
214 ~ .collect()
|
|
unneeded `return` statement:
ironfish-primitives/src/transaction/components/transparent/builder.rs#L206
warning: unneeded `return` statement
--> ironfish-primitives/src/transaction/components/transparent/builder.rs:206:9
|
206 | return self.inputs.iter().map(|txin| txin.coin.value).collect();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `-W clippy::needless-return` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_return)]`
help: remove `return`
|
206 - return self.inputs.iter().map(|txin| txin.coin.value).collect();
206 + self.inputs.iter().map(|txin| txin.coin.value).collect()
|
|
usage of a legacy numeric constant:
ironfish-primitives/src/transaction/components/transparent/builder.rs#L187
warning: usage of a legacy numeric constant
--> ironfish-primitives/src/transaction/components/transparent/builder.rs:187:23
|
187 | sequence: std::u32::MAX,
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
|
187 | sequence: u32::MAX,
| ~~~~~~~~
|
the borrowed expression implements the required traits:
ironfish-primitives/src/transaction/components/transparent/builder.rs#L103
warning: the borrowed expression implements the required traits
--> ironfish-primitives/src/transaction/components/transparent/builder.rs:103:50
|
103 | if hash[..] != Ripemd160::digest(&Sha256::digest(&pubkey))[..] {
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `Sha256::digest(&pubkey)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `-W clippy::needless-borrows-for-generic-args` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::needless_borrows_for_generic_args)]`
|
this let-binding has unit value:
ironfish-primitives/src/transaction/components/sapling/builder.rs#L608
warning: this let-binding has unit value
--> ironfish-primitives/src/transaction/components/sapling/builder.rs:608:13
|
608 | let mut ctx = prover.new_sapling_proving_context();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value
= note: `-W clippy::let-unit-value` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::let_unit_value)]`
help: omit the `let` binding
|
608 | prover.new_sapling_proving_context();
|
help: variable `ctx` of type `()` can be replaced with explicit `()`
|
612 | &mut (),
| ~~
help: variable `ctx` of type `()` can be replaced with explicit `()`
|
620 | &mut (),
| ~~
|
usage of `Iterator::fold` on a type that implements `Try`:
ironfish-primitives/src/transaction/components/amount.rs#L205
warning: usage of `Iterator::fold` on a type that implements `Try`
--> ironfish-primitives/src/transaction/components/amount.rs:205:14
|
205 | iter.fold(Some(Amount::zero()), |acc, a| acc? + *a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(Amount::zero(), |acc, a| ...)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
|
usage of `Iterator::fold` on a type that implements `Try`:
ironfish-primitives/src/transaction/components/amount.rs#L199
warning: usage of `Iterator::fold` on a type that implements `Try`
--> ironfish-primitives/src/transaction/components/amount.rs:199:14
|
199 | iter.fold(Some(Amount::zero()), |acc, a| acc? + a)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(Amount::zero(), |acc, a| ...)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
= note: `-W clippy::manual-try-fold` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::manual_try_fold)]`
|
manual `RangeInclusive::contains` implementation:
ironfish-primitives/src/transaction/components/amount.rs#L48
warning: manual `RangeInclusive::contains` implementation
--> ironfish-primitives/src/transaction/components/amount.rs:48:12
|
48 | if -MAX_MONEY <= amount && amount <= MAX_MONEY {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(-MAX_MONEY..=MAX_MONEY).contains(&amount)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
= note: `-W clippy::manual-range-contains` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::manual_range_contains)]`
|
the following explicit lifetimes could be elided: 'a:
ironfish-primitives/src/transaction/builder.rs#L131
warning: the following explicit lifetimes could be elided: 'a
--> ironfish-primitives/src/transaction/builder.rs:131:6
|
131 | impl<'a, P: consensus::Parameters> Builder<'a, P, OsRng> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
131 - impl<'a, P: consensus::Parameters> Builder<'a, P, OsRng> {
131 + impl<P: consensus::Parameters> Builder<'_, P, OsRng> {
|
|
this expression borrows a value the compiler would automatically borrow:
ironfish-primitives/src/sapling.rs#L436
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/sapling.rs:436:9
|
436 | (&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:
ironfish-primitives/src/sapling.rs#L159
warning: this expression borrows a value the compiler would automatically borrow
--> ironfish-primitives/src/sapling.rs:159:5
|
159 | (&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)]`
|
the following explicit lifetimes could be elided: 'a:
ironfish-primitives/src/sapling/redjubjub.rs#L176
warning: the following explicit lifetimes could be elided: 'a
--> ironfish-primitives/src/sapling/redjubjub.rs:176:21
|
176 | pub fn batch_verify<'a, R: RngCore>(
| ^^
177 | mut rng: &mut R,
178 | 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
|
176 ~ pub fn batch_verify<R: RngCore>(
177 | mut rng: &mut R,
178 ~ batch: &[BatchEntry<'_>],
|
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/sapling/pedersen_hash.rs#L41
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-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/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:479:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/sapling/note_encryption.rs#L361
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-primitives/src/sapling/note_encryption.rs:361:18
|
361 | .zip(ephemeral_keys.into_iter())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `ephemeral_keys`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
ironfish-primitives/src/sapling/note_encryption.rs#L340
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> ironfish-primitives/src/sapling/note_encryption.rs:340:18
|
340 | .zip(ephemeral_keys.into_iter())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `ephemeral_keys`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f/library/core/src/iter/traits/iterator.rs:598:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
useless conversion to the same type: `std::ops::Range<u8>`:
ironfish-primitives/src/merkle_tree.rs#L139
warning: useless conversion to the same type: `std::ops::Range<u8>`
--> ironfish-primitives/src/merkle_tree.rs:139:26
|
139 | parents: (1..DEPTH)
| __________________________^
140 | | .into_iter()
| |________________________________^ help: consider removing `.into_iter()`: `(1..DEPTH)`
|
= 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 `impl` can be derived:
ironfish-primitives/src/memo.rs#L175
warning: this `impl` can be derived
--> ironfish-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,
|
|
usage of a legacy numeric constant:
ironfish-primitives/src/consensus.rs#L612
warning: usage of a legacy numeric constant
--> ironfish-primitives/src/consensus.rs:612:44
|
612 | (lower.0..upper.map_or(std::u32::MAX, |u| u.0))
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
= note: `-W clippy::legacy-numeric-constants` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::legacy_numeric_constants)]`
help: use the associated constant instead
|
612 | (lower.0..upper.map_or(u32::MAX, |u| u.0))
| ~~~~~~~~
|
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)]`
|
manually reimplementing `div_ceil`:
components/f4jumble/src/lib.rs#L182
warning: manually reimplementing `div_ceil`
--> components/f4jumble/src/lib.rs:182:5
|
182 | (num + den - 1) / den
| ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `num.div_ceil(den)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil
= note: `-W clippy::manual-div-ceil` implied by `-W clippy::all`
= help: to override `-W clippy::all` add `#[allow(clippy::manual_div_ceil)]`
|
Clippy (beta)
The following actions uses node12 which is deprecated and will be forced to run on node16: 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 (beta)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Clippy (beta)
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 (beta)
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 (beta)
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 (beta)
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 following actions uses node12 which is deprecated and will be forced to run on node16: 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 following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-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/
|
Clippy (1.56.1)
The following actions uses node12 which is deprecated and will be forced to run on node16: 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.56.1)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Clippy (1.56.1)
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.56.1)
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.56.1)
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.56.1)
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-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 following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-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/
|
Bitrot check
The following actions uses node12 which is deprecated and will be forced to run on node16: 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 following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-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/
|
Rustfmt
The following actions uses node12 which is deprecated and will be forced to run on node16: 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 following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-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/
|
Code coverage
The following actions uses node12 which is deprecated and will be forced to run on node16: 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/
|
Code coverage
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-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/
|