Update comments #857
Annotations
6 warnings
Run Clippy:
src/lib.rs#L849
warning: usage of `Iterator::fold` on a type that implements `Try`
--> src/builder.rs:849:10
|
849 | .fold(Some(ValueSum::zero()), |acc, action| {
| __________^
850 | | acc? + action.value_sum()
851 | | })
| |__________^ help: use `try_fold` instead: `try_fold(ValueSum::zero(), |acc, action| ...)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
= note: `#[warn(clippy::manual_try_fold)]` on by default
|
Run Clippy:
src/lib.rs#L99
warning: empty line after doc comment
--> src/bundle/commitments.rs:99:5
|
99 | / /// [ZIP-226: Transfer and Burn of Zcash Shielded Assets][zip226]
100 | |
| |_
101 | /// [zip226]: https://zips.z.cash/zip-0226
102 | / fn hash_bundle_txid_data<A: Authorization, V: Copy + Into<i64>>(
103 | | bundle: &Bundle<A, V, Self::OrchardDomain>,
104 | | ) -> Blake2bHash {
| |____________________- the comment documents this associated function
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments
= note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default
= help: if the empty line is unintentional remove it
help: if the documentation should include the empty line include it in the comment
|
100 | ///
|
|
Run Clippy:
src/lib.rs#L218
warning: the following explicit lifetimes could be elided: 'a
--> src/bundle.rs:218:14
|
218 | impl<'a, A: fmt::Debug, D: OrchardDomainCommon> fmt::Debug for Actions<'a, A, D> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
218 - impl<'a, A: fmt::Debug, D: OrchardDomainCommon> fmt::Debug for Actions<'a, A, D> {
218 + impl<A: fmt::Debug, D: OrchardDomainCommon> fmt::Debug for Actions<'_, A, D> {
|
|
Run Clippy:
src/lib.rs#L270
warning: use of a fallible conversion when an infallible one could be used
--> src/keys.rs:270:27
|
270 | self.0.to_bytes().try_into().unwrap()
| ^^^^^^^^^^^^^^^^^^^
|
= note: converting `GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>` to `[u8; 32]` cannot fail
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
= note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default
help: use
|
270 - self.0.to_bytes().try_into().unwrap()
270 + self.0.to_bytes().into()
|
|
Run Clippy:
src/lib.rs#L337
warning: use of a fallible conversion when an infallible one could be used
--> src/keys.rs:337:27
|
337 | self.0.to_bytes().try_into().unwrap()
| ^^^^^^^^^^^^^^^^^^^
|
= note: converting `GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>` to `[u8; 32]` cannot fail
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
help: use
|
337 - self.0.to_bytes().try_into().unwrap()
337 + self.0.to_bytes().into()
|
|
Run Clippy:
src/lib.rs#L114
warning: unused return value of `std::hash::Hasher::finish` that must be used
--> src/note/asset_base.rs:114:9
|
114 | h.finish();
| ^^^^^^^^^^
|
= note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
|
114 | let _ = h.finish();
| +++++++
|
Loading