Add explicit control of padding to the Builder API. #3073
Clippy (Stable ~ Linux/x86_64)
Clippy was successful!
Details
Running cargo clippy
took roughly ~17055ms to complete
- Working Directory: repository directory
Annotations
Check warning on line 6 in /home/runner/work/orchard/orchard/src/lib.rs
github-actions / Clippy Result (stable)
/home/runner/work/orchard/orchard/src/lib.rs#L6
unused import: `H`
Raw output
warning: unused import: `H`
--> src/constants.rs:6:91
|
6 | pub use fixed_bases::{NullifierK, OrchardFixedBases, OrchardFixedBasesFull, ValueCommitV, H};
| ^
|
= note: `#[warn(unused_imports)]` on by default
Check warning on line 47 in /home/runner/work/orchard/orchard/src/lib.rs
github-actions / Clippy Result (stable)
/home/runner/work/orchard/orchard/src/lib.rs#L47
this returns a `Result<_, ()>`
Raw output
warning: this returns a `Result<_, ()>`
--> src/builder.rs:47:5
|
47 | pub fn num_actions(&self, num_spends: usize, num_recipients: usize) -> Result<usize, ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: use a custom `Error` type instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_unit_err
= note: `#[warn(clippy::result_unit_err)]` on by default
Check warning on line 417 in /home/runner/work/orchard/orchard/src/lib.rs
github-actions / Clippy Result (stable)
/home/runner/work/orchard/orchard/src/lib.rs#L417
usage of `Iterator::fold` on a type that implements `Try`
Raw output
warning: usage of `Iterator::fold` on a type that implements `Try`
--> src/builder.rs:417:14
|
417 | .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 456 in /home/runner/work/orchard/orchard/src/lib.rs
github-actions / Clippy Result (stable)
/home/runner/work/orchard/orchard/src/lib.rs#L456
explicit call to `.into_iter()` in function argument accepting `IntoIterator`
Raw output
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> src/builder.rs:456:22
|
456 | .zip(self.outputs.into_iter())
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `self.outputs`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/4bd9c37dc18d120ba5f307d8ddb07d733166227a/library/core/src/iter/traits/iterator.rs:643: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 246 in /home/runner/work/orchard/orchard/src/lib.rs
github-actions / Clippy Result (stable)
/home/runner/work/orchard/orchard/src/lib.rs#L246
explicit call to `.into_iter()` in function argument accepting `IntoIterator`
Raw output
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/4bd9c37dc18d120ba5f307d8ddb07d733166227a/library/core/src/iter/traits/iterator.rs:643:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Check warning on line 195 in /home/runner/work/orchard/orchard/src/lib.rs
github-actions / Clippy Result (stable)
/home/runner/work/orchard/orchard/src/lib.rs#L195
usage of `Iterator::fold` on a type that implements `Try`
Raw output
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 201 in /home/runner/work/orchard/orchard/src/lib.rs
github-actions / Clippy Result (stable)
/home/runner/work/orchard/orchard/src/lib.rs#L201
usage of `Iterator::fold` on a type that implements `Try`
Raw output
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 0 in ./file/that/probably/doesnt/exist.rs
github-actions / Clippy Result (stable)
./file/that/probably/doesnt/exist.rs#L0
9 warnings emitted
Raw output
warning: 9 warnings emitted