Skip to content

allow creating FullViewingKey from SpendValidatingKey #3

allow creating FullViewingKey from SpendValidatingKey

allow creating FullViewingKey from SpendValidatingKey #3

This check has been archived and is scheduled for deletion. Learn more about checks retention
GitHub Actions / Clippy (beta) succeeded Jul 24, 2023 in 0s

Clippy (beta)

14 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 14
Note 0
Help 0

Versions

  • rustc 1.72.0-beta.3 (a47f796a3 2023-07-22)
  • cargo 1.72.0-beta.3 (dd6536b8e 2023-07-18)
  • clippy 0.1.72 (a47f796 2023-07-22)

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 warning on line 264 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:264:18
    |
264 |             .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/a47f796a36593d352d79ee66d7f4c12d100f5241/library/core/src/iter/traits/iterator.rs:641: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 warning on line 264 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:264:18
    |
264 |             .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/a47f796a36593d352d79ee66d7f4c12d100f5241/library/core/src/iter/traits/iterator.rs:641:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 433 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:431:14
    |
431 |               .fold(Some(ValueSum::zero()), |acc, action| {
    |  ______________^
432 | |                 acc? + action.value_sum()
433 | |             })
    | |______________^ 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 419 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:419:22
    |
419 |                 .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/a47f796a36593d352d79ee66d7f4c12d100f5241/library/core/src/iter/traits/iterator.rs:641: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 380 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:380:14
    |
380 |             .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 433 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:431:14
    |
431 |               .fold(Some(ValueSum::zero()), |acc, action| {
    |  ______________^
432 | |                 acc? + action.value_sum()
433 | |             })
    | |______________^ 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 419 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:419:22
    |
419 |                 .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/a47f796a36593d352d79ee66d7f4c12d100f5241/library/core/src/iter/traits/iterator.rs:641: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 380 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:380:14
    |
380 |             .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 323 in src/keys.rs

See this annotation in the file changed.

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

redundant field names in struct initialization

warning: redundant field names in struct initialization
   --> src/keys.rs:323:13
    |
323 |             ak: ak,
    |             ^^^^^^ help: replace it with: `ak`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
    = note: `#[warn(clippy::redundant_field_names)]` on by default

Check warning on line 323 in src/keys.rs

See this annotation in the file changed.

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

redundant field names in struct initialization

warning: redundant field names in struct initialization
   --> src/keys.rs:323:13
    |
323 |             ak: ak,
    |             ^^^^^^ help: replace it with: `ak`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
    = note: `#[warn(clippy::redundant_field_names)]` on by default