Fix Cargo.toml for the previous commit 2 #957
Clippy (beta)
16 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 16 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.73.0-beta.1 (680cdf816 2023-08-21)
- cargo 1.73.0-beta.1 (80eca0e58 2023-08-19)
- clippy 0.1.73 (680cdf8 2023-08-21)
Annotations
Check warning on line 232 in src/value.rs
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:232:14
|
232 | 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 226 in src/value.rs
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:226:14
|
226 | 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 343 in src/note_encryption_v3.rs
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_v3.rs:343:18
|
343 | .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/680cdf8168a906b4ea80af673c64e4a16f77be57/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 67 in src/supply_info.rs
github-actions / Clippy (beta)
usage of `bool::then` in `filter_map`
warning: usage of `bool::then` in `filter_map`
--> src/supply_info.rs:67:18
|
67 | .filter_map(|(asset, supply)| supply.is_finalized.then(|| asset)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `filter` then `map` instead: `filter(|&(asset, supply)| supply.is_finalized).map(|(asset, supply)| asset)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_bool_then
= note: `#[warn(clippy::filter_map_bool_then)]` on by default
Check warning on line 164 in src/note/commitment.rs
github-actions / Clippy (beta)
use of `default` to create a unit struct
warning: use of `default` to create a unit struct
--> src/note/commitment.rs:164:31
|
164 | let mut os_rng = OsRng::default();
| ^^^^^^^^^^^ help: remove this call to `default`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
= note: `#[warn(clippy::default_constructed_unit_structs)]` on by default
Check warning on line 206 in tests/zsa.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> tests/zsa.rs:206:33
|
206 | proven.apply_signatures(&mut rng, sighash, &[]).unwrap()
| ^^^^^^^^ help: change this to: `rng`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 98 in tests/zsa.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> tests/zsa.rs:98:27
|
98 | .apply_signatures(&mut rng, sighash, &[SpendAuthorizingKey::from(sk)])
| ^^^^^^^^ help: change this to: `rng`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 85 in tests/zsa.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> tests/zsa.rs:85:17
|
85 | proven.sign(&mut rng, isk).unwrap()
| ^^^^^^^^ help: change this to: `rng`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
Check warning on line 232 in src/value.rs
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:232:14
|
232 | 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 226 in src/value.rs
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:226:14
|
226 | 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 343 in src/note_encryption_v3.rs
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_v3.rs:343:18
|
343 | .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/680cdf8168a906b4ea80af673c64e4a16f77be57/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 67 in src/supply_info.rs
github-actions / Clippy (beta)
usage of `bool::then` in `filter_map`
warning: usage of `bool::then` in `filter_map`
--> src/supply_info.rs:67:18
|
67 | .filter_map(|(asset, supply)| supply.is_finalized.then(|| asset)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `filter` then `map` instead: `filter(|&(asset, supply)| supply.is_finalized).map(|(asset, supply)| asset)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_bool_then
= note: `#[warn(clippy::filter_map_bool_then)]` on by default
Check warning on line 532 in src/builder.rs
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:530:14
|
530 | .fold(Some(ValueSum::zero()), |acc, action| {
| ______________^
531 | | acc? + action.value_sum()
532 | | })
| |______________^ 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 455 in src/builder.rs
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:455:14
|
455 | .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 532 in src/builder.rs
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:530:14
|
530 | .fold(Some(ValueSum::zero()), |acc, action| {
| ______________^
531 | | acc? + action.value_sum()
532 | | })
| |______________^ 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 455 in src/builder.rs
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:455:14
|
455 | .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