Ec2/txn table #17
Triggered via pull request
August 23, 2024 15:54
Status
Failure
Total duration
1d 22h 50m 11s
Artifacts
–
ci.yml
on: pull_request
Bitrot check
1m 47s
Clippy (MSRV)
1m 24s
Clippy (beta)
13s
Code coverage
20m 1s
Intra-doc links
2m 1s
Rustfmt
15s
protobuf consistency
1m 12s
UUID validity
3s
Matrix: build-latest
Matrix: build-nodefault
Matrix: check-msrv
Matrix: test
Annotations
24 errors and 5 warnings
Clippy (beta)
The process '/home/runner/.cargo/bin/cargo' failed with exit code 1
|
unnecessary closure used to substitute value for `Option::None`:
zcash_client_memory/src/mem_wallet/wallet_write.rs#L63
error: unnecessary closure used to substitute value for `Option::None`
--> zcash_client_memory/src/mem_wallet/wallet_write.rs:63:22
|
63 | .map(|a| a.next().ok_or_else(|| Self::Error::AccountOutOfRange))
| ^^^^^^^^^---------------------------------------------
| |
| help: use `ok_or(..)` instead: `ok_or(Self::Error::AccountOutOfRange)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
|
unnecessary closure used to substitute value for `Option::None`:
zcash_client_memory/src/mem_wallet/wallet_write.rs#L58
error: unnecessary closure used to substitute value for `Option::None`
--> zcash_client_memory/src/mem_wallet/wallet_write.rs:58:32
|
58 | let seed_fingerprint = SeedFingerprint::from_seed(seed.expose_secret())
| ________________________________^
59 | | .ok_or_else(|| Self::Error::InvalidSeedLength)?;
| |______________--------------------------------------------^
| |
| help: use `ok_or(..)` instead: `ok_or(Self::Error::InvalidSeedLength)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `-D clippy::unnecessary-lazy-evaluations` implied by `-D warnings`
|
using `clone` on type `TransparentAddress` which implements the `Copy` trait:
zcash_client_memory/src/mem_wallet/wallet_read.rs#L369
error: using `clone` on type `TransparentAddress` which implements the `Copy` trait
--> zcash_client_memory/src/mem_wallet/wallet_read.rs:369:32
|
369 | let addr = output.recipient_address().clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*output.recipient_address()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `-D clippy::clone-on-copy` implied by `-D warnings`
|
this expression creates a reference which is immediately dereferenced by the compiler:
zcash_client_memory/src/mem_wallet/wallet_read.rs#L364
error: this expression creates a reference which is immediately dereferenced by the compiler
--> zcash_client_memory/src/mem_wallet/wallet_read.rs:364:35
|
364 | .contains_key(&outpoint)
| ^^^^^^^^^ help: change this to: `outpoint`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `-D clippy::needless-borrow` implied by `-D warnings`
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
zcash_client_memory/src/mem_wallet/wallet_read.rs#L350
error: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> zcash_client_memory/src/mem_wallet/wallet_read.rs:350:65
|
350 | if let Some(TransactionStatus::Mined(height)) = self
| _________________________________________________________________^
351 | | .tx_table
352 | | .get(&output.tx_id)
353 | | .and_then(|entry| Some(entry.tx_status))
| |____________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
help: try this
|
350 ~ if let Some(TransactionStatus::Mined(height)) = self
351 + .tx_table
352 + .get(&output.tx_id).map(|entry| entry.tx_status)
|
|
called `map(..).flatten()` on `Iterator`:
zcash_client_memory/src/mem_wallet/wallet_read.rs#L260
error: called `map(..).flatten()` on `Iterator`
--> zcash_client_memory/src/mem_wallet/wallet_read.rs:260:14
|
260 | .map(|(txid, height, nf)| {
| ______________^
261 | | self.tx_table
262 | | .get(txid)
263 | | .and_then(|entry| entry.tx_meta.as_ref())
... |
276 | | })
277 | | .flatten()
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
= note: `-D clippy::map-flatten` implied by `-D warnings`
help: try replacing `map` with `filter_map` and remove the `.flatten()`
|
260 ~ .filter_map(|(txid, height, nf)| {
261 + self.tx_table
262 + .get(txid)
263 + .and_then(|entry| entry.tx_meta.as_ref())
264 + .and_then(|tx| {
265 + tx.sapling_outputs()
266 + .iter()
267 + .find(|o| o.nf() == Some(&nf))
268 + .map(|o| (*o.account_id(), *o.nf().unwrap()))
269 + .or_else(|| {
270 + tx.sapling_spends()
271 + .iter()
272 + .find(|s| s.nf() == &nf)
273 + .map(|s| (*s.account_id(), *s.nf()))
274 + })
275 + })
276 + })
|
|
manual implementation of `Option::map`:
zcash_client_memory/src/mem_wallet/wallet_read.rs#L213
error: manual implementation of `Option::map`
--> zcash_client_memory/src/mem_wallet/wallet_read.rs:213:35
|
213 | .filter_map(|account| match account.ufvk() {
| ___________________________________^
214 | | Some(ufvk) => Some((account.id(), ufvk.clone())),
215 | | None => None,
216 | | })
| |_____________^ help: try this: `account.ufvk().map(|ufvk| (account.id(), ufvk.clone()))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
= note: `-D clippy::manual-map` implied by `-D warnings`
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
zcash_client_memory/src/mem_wallet/wallet_read.rs#L196
error: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> zcash_client_memory/src/mem_wallet/wallet_read.rs:196:57
|
196 | if let Some(TransactionStatus::Mined(height)) = self
| _________________________________________________________^
197 | | .tx_table
198 | | .get(&txid)
199 | | .and_then(|entry| Some(entry.tx_status))
| |____________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `-D clippy::bind-instead-of-map` implied by `-D warnings`
help: try this
|
196 ~ if let Some(TransactionStatus::Mined(height)) = self
197 + .tx_table
198 + .get(&txid).map(|entry| entry.tx_status)
|
|
unnecessary closure used to substitute value for `Option::None`:
zcash_client_memory/src/mem_wallet/wallet_write.rs#L63
error: unnecessary closure used to substitute value for `Option::None`
--> zcash_client_memory/src/mem_wallet/wallet_write.rs:63:22
|
63 | .map(|a| a.next().ok_or_else(|| Self::Error::AccountOutOfRange))
| ^^^^^^^^^---------------------------------------------
| |
| help: use `ok_or(..)` instead: `ok_or(Self::Error::AccountOutOfRange)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
|
unnecessary closure used to substitute value for `Option::None`:
zcash_client_memory/src/mem_wallet/wallet_write.rs#L58
error: unnecessary closure used to substitute value for `Option::None`
--> zcash_client_memory/src/mem_wallet/wallet_write.rs:58:32
|
58 | let seed_fingerprint = SeedFingerprint::from_seed(seed.expose_secret())
| ________________________________^
59 | | .ok_or_else(|| Self::Error::InvalidSeedLength)?;
| |______________--------------------------------------------^
| |
| help: use `ok_or(..)` instead: `ok_or(Self::Error::InvalidSeedLength)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
= note: `-D clippy::unnecessary-lazy-evaluations` implied by `-D warnings`
|
using `clone` on type `TransparentAddress` which implements the `Copy` trait:
zcash_client_memory/src/mem_wallet/wallet_read.rs#L369
error: using `clone` on type `TransparentAddress` which implements the `Copy` trait
--> zcash_client_memory/src/mem_wallet/wallet_read.rs:369:32
|
369 | let addr = output.recipient_address().clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*output.recipient_address()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `-D clippy::clone-on-copy` implied by `-D warnings`
|
this expression creates a reference which is immediately dereferenced by the compiler:
zcash_client_memory/src/mem_wallet/wallet_read.rs#L364
error: this expression creates a reference which is immediately dereferenced by the compiler
--> zcash_client_memory/src/mem_wallet/wallet_read.rs:364:35
|
364 | .contains_key(&outpoint)
| ^^^^^^^^^ help: change this to: `outpoint`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `-D clippy::needless-borrow` implied by `-D warnings`
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
zcash_client_memory/src/mem_wallet/wallet_read.rs#L350
error: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> zcash_client_memory/src/mem_wallet/wallet_read.rs:350:65
|
350 | if let Some(TransactionStatus::Mined(height)) = self
| _________________________________________________________________^
351 | | .tx_table
352 | | .get(&output.tx_id)
353 | | .and_then(|entry| Some(entry.tx_status))
| |____________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
help: try this
|
350 ~ if let Some(TransactionStatus::Mined(height)) = self
351 + .tx_table
352 + .get(&output.tx_id).map(|entry| entry.tx_status)
|
|
called `map(..).flatten()` on `Iterator`:
zcash_client_memory/src/mem_wallet/wallet_read.rs#L260
error: called `map(..).flatten()` on `Iterator`
--> zcash_client_memory/src/mem_wallet/wallet_read.rs:260:14
|
260 | .map(|(txid, height, nf)| {
| ______________^
261 | | self.tx_table
262 | | .get(txid)
263 | | .and_then(|entry| entry.tx_meta.as_ref())
... |
276 | | })
277 | | .flatten()
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
= note: `-D clippy::map-flatten` implied by `-D warnings`
help: try replacing `map` with `filter_map` and remove the `.flatten()`
|
260 ~ .filter_map(|(txid, height, nf)| {
261 + self.tx_table
262 + .get(txid)
263 + .and_then(|entry| entry.tx_meta.as_ref())
264 + .and_then(|tx| {
265 + tx.sapling_outputs()
266 + .iter()
267 + .find(|o| o.nf() == Some(&nf))
268 + .map(|o| (*o.account_id(), *o.nf().unwrap()))
269 + .or_else(|| {
270 + tx.sapling_spends()
271 + .iter()
272 + .find(|s| s.nf() == &nf)
273 + .map(|s| (*s.account_id(), *s.nf()))
274 + })
275 + })
276 + })
|
|
manual implementation of `Option::map`:
zcash_client_memory/src/mem_wallet/wallet_read.rs#L213
error: manual implementation of `Option::map`
--> zcash_client_memory/src/mem_wallet/wallet_read.rs:213:35
|
213 | .filter_map(|account| match account.ufvk() {
| ___________________________________^
214 | | Some(ufvk) => Some((account.id(), ufvk.clone())),
215 | | None => None,
216 | | })
| |_____________^ help: try this: `account.ufvk().map(|ufvk| (account.id(), ufvk.clone()))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
= note: `-D clippy::manual-map` implied by `-D warnings`
|
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`:
zcash_client_memory/src/mem_wallet/wallet_read.rs#L196
error: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> zcash_client_memory/src/mem_wallet/wallet_read.rs:196:57
|
196 | if let Some(TransactionStatus::Mined(height)) = self
| _________________________________________________________^
197 | | .tx_table
198 | | .get(&txid)
199 | | .and_then(|entry| Some(entry.tx_status))
| |____________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `-D clippy::bind-instead-of-map` implied by `-D warnings`
help: try this
|
196 ~ if let Some(TransactionStatus::Mined(height)) = self
197 + .tx_table
198 + .get(&txid).map(|entry| entry.tx_status)
|
|
Clippy (MSRV)
Clippy had exited with the 101 exit code
|
Test NU6 on Linux
This request was automatically failed because there were no enabled runners online to process the request for more than 1 days.
|
Test Orchard on Linux
This request was automatically failed because there were no enabled runners online to process the request for more than 1 days.
|
Test on Linux
This request was automatically failed because there were no enabled runners online to process the request for more than 1 days.
|
Test on Windows
This request was automatically failed because there were no enabled runners online to process the request for more than 1 days.
|
Test NU6 on Windows
This request was automatically failed because there were no enabled runners online to process the request for more than 1 days.
|
Test Orchard on Windows
This request was automatically failed because there were no enabled runners online to process the request for more than 1 days.
|
Clippy (beta)
The following actions uses node12 which is deprecated and will be forced to run on node16: 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-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 (MSRV)
The following actions uses node12 which is deprecated and will be forced to run on node16: 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 (MSRV)
The following actions use a deprecated Node.js version and will be forced to run on node20: 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/
|
Code coverage
Codecov: Failed to properly create commit: The process '/__w/_actions/codecov/codecov-action/v4.5.0/dist/codecov' failed with exit code 1
|