Skip to content

chore: Derive Eq, Hash at a bunch of places #106

chore: Derive Eq, Hash at a bunch of places

chore: Derive Eq, Hash at a bunch of places #106

Triggered via pull request August 24, 2023 18:56
@ggutoskiggutoski
synchronize #362
Status Success
Total duration 35s
Artifacts

commit-title.yaml

on: pull_request_target
Fit to window
Zoom out
Zoom in

Annotations

6 errors
incorrect implementation of `clone` on a `Copy` type: primitives/src/pcs/univariate_kzg/srs.rs#L44
error: incorrect implementation of `clone` on a `Copy` type --> primitives/src/pcs/univariate_kzg/srs.rs:44:10 | 44 | #[derive(Derivative, CanonicalSerialize, CanonicalDeserialize)] | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incorrect_clone_impl_on_copy_type = note: this error originates in the derive macro `Derivative` (in Nightly builds, run with -Z macro-backtrace for more info)
incorrect implementation of `clone` on a `Copy` type: primitives/src/pcs/structs.rs#L11
error: incorrect implementation of `clone` on a `Copy` type --> primitives/src/pcs/structs.rs:11:10 | 11 | #[derive(Derivative, CanonicalSerialize, CanonicalDeserialize)] | ^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incorrect_clone_impl_on_copy_type = note: `#[deny(clippy::incorrect_clone_impl_on_copy_type)]` on by default = note: this error originates in the derive macro `Derivative` (in Nightly builds, run with -Z macro-backtrace for more info)
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: primitives/src/pcs/poly.rs#L216
error: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> primitives/src/pcs/poly.rs:216:30 | 216 | .zip_longest(rhs.coeffs.into_iter()) | ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `rhs.coeffs` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/itertools-0.10.5/src/lib.rs:539:18 | 539 | where J: IntoIterator, | ^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion = note: `#[deny(clippy::useless_conversion)]` implied by `#[deny(warnings)]`
usage of `Iterator::fold` on a type that implements `Try`: primitives/src/merkle_tree/internal.rs#L884
error: usage of `Iterator::fold` on a type that implements `Try` --> primitives/src/merkle_tree/internal.rs:884:18 | 884 | .fold( | __________________^ 885 | | Ok(init), 886 | | |result, (branch, node)| -> Result<T, PrimitivesError> { 887 | | match result { ... | 904 | | }, 905 | | )?; | |_________________^ help: use `try_fold` instead: `try_fold(init, |result, (branch, node)| ...)` | = 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`: primitives/src/merkle_tree/internal.rs#L835
error: usage of `Iterator::fold` on a type that implements `Try` --> primitives/src/merkle_tree/internal.rs:835:18 | 835 | .fold( | __________________^ 836 | | Ok(init), 837 | | |result, (branch, node)| -> Result<T, PrimitivesError> { 838 | | match result { ... | 854 | | }, 855 | | )?; | |_________________^ help: use `try_fold` instead: `try_fold(init, |result, (branch, node)| ...)` | = 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`: primitives/src/merkle_tree/universal_merkle_tree.rs#L143
error: usage of `Iterator::fold` on a type that implements `Try` --> primitives/src/merkle_tree/universal_merkle_tree.rs:143:67 | 143 | traversal_path.iter().zip(proof.proof.iter().skip(1)).fold( | ___________________________________________________________________^ 144 | | Ok(empty_value), 145 | | |result: Result<T, PrimitivesError>, 146 | | (branch, node)| ... | 168 | | }, 169 | | )?; | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold note: the lint level is defined here --> primitives/src/lib.rs:11:9 | 11 | #![deny(warnings)] | ^^^^^^^^ = note: `#[deny(clippy::manual_try_fold)]` implied by `#[deny(warnings)]` help: use `try_fold` instead | 143 ~ traversal_path.iter().zip(proof.proof.iter().skip(1)).try_fold(empty_value, |result: Result<T, PrimitivesError>, 144 ~ (branch, node)| ...)?; |