Skip to content

Merge pull request #398 from zcash/update_incrementalmerkletree #231

Merge pull request #398 from zcash/update_incrementalmerkletree

Merge pull request #398 from zcash/update_incrementalmerkletree #231

GitHub Actions / Clippy (beta) failed Sep 8, 2023 in 1s

Clippy (beta)

2 errors, 12 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 2
Warning 12
Note 0
Help 0

Versions

  • rustc 1.73.0-beta.4 (9f37cd4f7 2023-09-01)
  • cargo 1.73.0-beta.4 (9c4383fb5 2023-08-26)
  • clippy 0.1.73 (9f37cd4 2023-09-01)

Annotations

Check warning on line 201 in src/value.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

usage of `Iterator::fold` on a type that implements `Try`

warning: usage of `Iterator::fold` on a type that implements `Try`
   --> src/value.rs:201:14
    |
201 |         iter.fold(Ok(ValueSum(0)), |acc, v| (acc? + v).ok_or(OverflowError))
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(ValueSum(0), |acc, v| ...)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold

Check warning on line 195 in src/value.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

usage of `Iterator::fold` on a type that implements `Try`

warning: usage of `Iterator::fold` on a type that implements `Try`
   --> src/value.rs:195:14
    |
195 |         iter.fold(Ok(ValueSum(0)), |acc, v| (acc? + *v).ok_or(OverflowError))
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(ValueSum(0), |acc, v| ...)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold

Check failure on line 106 in src/primitives/redpallas.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

incorrect implementation of `partial_cmp` on an `Ord` type

error: incorrect implementation of `partial_cmp` on an `Ord` type
   --> src/primitives/redpallas.rs:102:1
    |
102 | /  impl<T: SigType> PartialOrd for VerificationKey<T> {
103 | |      fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
    | | _____________________________________________________________-
104 | ||         <[u8; 32]>::from(self).partial_cmp(&<[u8; 32]>::from(other))
105 | ||     }
    | ||_____- help: change this to: `{ Some(self.cmp(other)) }`
106 | |  }
    | |__^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incorrect_partial_ord_impl_on_ord_type
    = note: `#[deny(clippy::incorrect_partial_ord_impl_on_ord_type)]` on by default

Check warning on line 246 in src/note_encryption.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> src/note_encryption.rs:246:18
    |
246 |             .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/9f37cd4f79d289492ccaa8f28733b765498c95e5/library/core/src/iter/traits/iterator.rs:642:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 201 in src/value.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

usage of `Iterator::fold` on a type that implements `Try`

warning: usage of `Iterator::fold` on a type that implements `Try`
   --> src/value.rs:201:14
    |
201 |         iter.fold(Ok(ValueSum(0)), |acc, v| (acc? + v).ok_or(OverflowError))
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(ValueSum(0), |acc, v| ...)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold

Check warning on line 195 in src/value.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

usage of `Iterator::fold` on a type that implements `Try`

warning: usage of `Iterator::fold` on a type that implements `Try`
   --> src/value.rs:195:14
    |
195 |         iter.fold(Ok(ValueSum(0)), |acc, v| (acc? + *v).ok_or(OverflowError))
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(ValueSum(0), |acc, v| ...)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold

Check failure on line 106 in src/primitives/redpallas.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

incorrect implementation of `partial_cmp` on an `Ord` type

error: incorrect implementation of `partial_cmp` on an `Ord` type
   --> src/primitives/redpallas.rs:102:1
    |
102 | /  impl<T: SigType> PartialOrd for VerificationKey<T> {
103 | |      fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
    | | _____________________________________________________________-
104 | ||         <[u8; 32]>::from(self).partial_cmp(&<[u8; 32]>::from(other))
105 | ||     }
    | ||_____- help: change this to: `{ Some(self.cmp(other)) }`
106 | |  }
    | |__^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incorrect_partial_ord_impl_on_ord_type
    = note: `#[deny(clippy::incorrect_partial_ord_impl_on_ord_type)]` on by default

Check warning on line 246 in src/note_encryption.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> src/note_encryption.rs:246:18
    |
246 |             .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/9f37cd4f79d289492ccaa8f28733b765498c95e5/library/core/src/iter/traits/iterator.rs:642:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 432 in src/builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

usage of `Iterator::fold` on a type that implements `Try`

warning: usage of `Iterator::fold` on a type that implements `Try`
   --> src/builder.rs:430:14
    |
430 |               .fold(Some(ValueSum::zero()), |acc, action| {
    |  ______________^
431 | |                 acc? + action.value_sum()
432 | |             })
    | |______________^ 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

Check warning on line 418 in src/builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> src/builder.rs:418:22
    |
418 |                 .zip(self.recipients.into_iter())
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `self.recipients`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/9f37cd4f79d289492ccaa8f28733b765498c95e5/library/core/src/iter/traits/iterator.rs:642:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
    = note: `#[warn(clippy::useless_conversion)]` on by default

Check warning on line 379 in src/builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

usage of `Iterator::fold` on a type that implements `Try`

warning: usage of `Iterator::fold` on a type that implements `Try`
   --> src/builder.rs:379:14
    |
379 |             .fold(Some(ValueSum::zero()), |acc, note_value| acc? + note_value)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(ValueSum::zero(), |acc, note_value| ...)`
    |
    = 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

Check warning on line 432 in src/builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

usage of `Iterator::fold` on a type that implements `Try`

warning: usage of `Iterator::fold` on a type that implements `Try`
   --> src/builder.rs:430:14
    |
430 |               .fold(Some(ValueSum::zero()), |acc, action| {
    |  ______________^
431 | |                 acc? + action.value_sum()
432 | |             })
    | |______________^ 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

Check warning on line 418 in src/builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> src/builder.rs:418:22
    |
418 |                 .zip(self.recipients.into_iter())
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `self.recipients`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/9f37cd4f79d289492ccaa8f28733b765498c95e5/library/core/src/iter/traits/iterator.rs:642:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
    = note: `#[warn(clippy::useless_conversion)]` on by default

Check warning on line 379 in src/builder.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

usage of `Iterator::fold` on a type that implements `Try`

warning: usage of `Iterator::fold` on a type that implements `Try`
   --> src/builder.rs:379:14
    |
379 |             .fold(Some(ValueSum::zero()), |acc, note_value| acc? + note_value)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `try_fold` instead: `try_fold(ValueSum::zero(), |acc, note_value| ...)`
    |
    = 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