Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalized orchardZSA #96

Closed

Remove rng from AssetBase::random call

617d37a
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Closed

Generalized orchardZSA #96

Remove rng from AssetBase::random call
617d37a
Select commit
Loading
Failed to load commit list.
GitHub Actions / Clippy (beta) succeeded Apr 9, 2024 in 0s

Clippy (beta)

35 warnings

Details

Results

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

Versions

  • rustc 1.78.0-beta.5 (9eff51035 2024-04-06)
  • cargo 1.78.0-beta.5 (54d8815d0 2024-03-26)
  • clippy 0.1.78 (9eff510 2024-04-06)

Annotations

Check warning on line 164 in src/note/commitment.rs

See this annotation in the file changed.

@github-actions 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 330 in src/keys.rs

See this annotation in the file changed.

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

use of a fallible conversion when an infallible one could be used

warning: use of a fallible conversion when an infallible one could be used
   --> src/keys.rs:330:27
    |
330 |         self.0.to_bytes().try_into().unwrap()
    |                           ^^^^^^^^^^^^^^^^^^^
    |
    = note: converting `GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>` to `[u8; 32]` cannot fail
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
help: use
    |
330 -         self.0.to_bytes().try_into().unwrap()
330 +         self.0.to_bytes().into()
    |

Check warning on line 263 in src/keys.rs

See this annotation in the file changed.

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

use of a fallible conversion when an infallible one could be used

warning: use of a fallible conversion when an infallible one could be used
   --> src/keys.rs:263:27
    |
263 |         self.0.to_bytes().try_into().unwrap()
    |                           ^^^^^^^^^^^^^^^^^^^
    |
    = note: converting `GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>` to `[u8; 32]` cannot fail
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
    = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default
help: use
    |
263 -         self.0.to_bytes().try_into().unwrap()
263 +         self.0.to_bytes().into()
    |

Check warning on line 172 in tests/zsa.rs

See this annotation in the file changed.

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

accessing first element with `notes.get(0)`

warning: accessing first element with `notes.get(0)`
   --> tests/zsa.rs:172:17
    |
172 |     let note1 = notes.get(0).unwrap();
    |                 ^^^^^^^^^^^^ help: try: `notes.first()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
    = note: `#[warn(clippy::get_first)]` on by default

Check warning on line 330 in src/keys.rs

See this annotation in the file changed.

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

use of a fallible conversion when an infallible one could be used

warning: use of a fallible conversion when an infallible one could be used
   --> src/keys.rs:330:27
    |
330 |         self.0.to_bytes().try_into().unwrap()
    |                           ^^^^^^^^^^^^^^^^^^^
    |
    = note: converting `GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>` to `[u8; 32]` cannot fail
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
help: use
    |
330 -         self.0.to_bytes().try_into().unwrap()
330 +         self.0.to_bytes().into()
    |

Check warning on line 263 in src/keys.rs

See this annotation in the file changed.

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

use of a fallible conversion when an infallible one could be used

warning: use of a fallible conversion when an infallible one could be used
   --> src/keys.rs:263:27
    |
263 |         self.0.to_bytes().try_into().unwrap()
    |                           ^^^^^^^^^^^^^^^^^^^
    |
    = note: converting `GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>` to `[u8; 32]` cannot fail
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
    = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default
help: use
    |
263 -         self.0.to_bytes().try_into().unwrap()
263 +         self.0.to_bytes().into()
    |

Check warning on line 3 in src/primitives/redpallas.rs

See this annotation in the file changed.

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

the item `PartialOrd` is imported redundantly

warning: the item `PartialOrd` is imported redundantly
 --> src/primitives/redpallas.rs:3:32
  |
3 | use core::cmp::{Ord, Ordering, PartialOrd};
  |                                ^^^^^^^^^^
 --> /rustc/9eff5103597e0ce73244028c96c75866dbcbad1d/library/std/src/prelude/mod.rs:125:13
  |
  = note: the item `PartialOrd` is already defined here

Check warning on line 3 in src/primitives/redpallas.rs

See this annotation in the file changed.

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

the item `Ord` is imported redundantly

warning: the item `Ord` is imported redundantly
 --> src/primitives/redpallas.rs:3:17
  |
3 | use core::cmp::{Ord, Ordering, PartialOrd};
  |                 ^^^
 --> /rustc/9eff5103597e0ce73244028c96c75866dbcbad1d/library/std/src/prelude/mod.rs:125:13
  |
  = note: the item `Ord` is already defined here

Check warning on line 1162 in src/keys.rs

See this annotation in the file changed.

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

the item `PrimeField` is imported redundantly

warning: the item `PrimeField` is imported redundantly
    --> src/keys.rs:1162:9
     |
1162 |     use ff::PrimeField;
     |         ^^^^^^^^^^^^^^
...
1167 |         *,
     |         - the item `PrimeField` is already imported here

Check warning on line 6 in src/constants.rs

See this annotation in the file changed.

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

unused import: `H`

warning: unused import: `H`
 --> src/constants.rs:6:91
  |
6 | pub use fixed_bases::{NullifierK, OrchardFixedBases, OrchardFixedBasesFull, ValueCommitV, H};
  |                                                                                           ^

Check warning on line 166 in src/constants/sinsemilla.rs

See this annotation in the file changed.

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

the item `rand` is imported redundantly

warning: the item `rand` is imported redundantly
   --> src/constants/sinsemilla.rs:166:16
    |
166 |     use rand::{self, rngs::OsRng, Rng};
    |                ^^^^ the item `rand` is already defined by prelude

Check warning on line 165 in src/constants/sinsemilla.rs

See this annotation in the file changed.

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

the item `pallas` is imported redundantly

warning: the item `pallas` is imported redundantly
   --> src/constants/sinsemilla.rs:165:9
    |
154 |     use super::*;
    |         -------- the item `pallas` is already imported here
...
165 |     use halo2_proofs::pasta::pallas;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 164 in src/constants/sinsemilla.rs

See this annotation in the file changed.

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

the item `CurveAffine` is imported redundantly

warning: the item `CurveAffine` is imported redundantly
   --> src/constants/sinsemilla.rs:164:9
    |
154 |     use super::*;
    |         -------- the item `CurveAffine` is already imported here
...
164 |     use halo2_proofs::arithmetic::CurveAffine;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 162 in src/constants/sinsemilla.rs

See this annotation in the file changed.

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

the item `PrimeField` is imported redundantly

warning: the item `PrimeField` is imported redundantly
   --> src/constants/sinsemilla.rs:162:17
    |
154 |     use super::*;
    |         -------- the item `PrimeField` is already imported here
...
162 |     use group::{ff::PrimeField, Curve};
    |                 ^^^^^^^^^^^^^^

Check warning on line 160 in src/constants/sinsemilla.rs

See this annotation in the file changed.

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

the item `MERKLE_CRH_PERSONALIZATION` is imported redundantly

warning: the item `MERKLE_CRH_PERSONALIZATION` is imported redundantly
   --> src/constants/sinsemilla.rs:160:9
    |
154 |     use super::*;
    |         -------- the item `MERKLE_CRH_PERSONALIZATION` is already imported here
...
160 |         sinsemilla::MERKLE_CRH_PERSONALIZATION,
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 791 in src/constants/fixed_bases/value_commit_v.rs

See this annotation in the file changed.

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

the item `pallas` is imported redundantly

warning: the item `pallas` is imported redundantly
   --> src/constants/fixed_bases/value_commit_v.rs:791:9
    |
786 |     use super::*;
    |         -------- the item `pallas` is already imported here
...
791 |         pallas,
    |         ^^^^^^

Check warning on line 790 in src/constants/fixed_bases/value_commit_v.rs

See this annotation in the file changed.

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

the item `CurveAffine` is imported redundantly

warning: the item `CurveAffine` is imported redundantly
   --> src/constants/fixed_bases/value_commit_v.rs:790:22
    |
786 |     use super::*;
    |         -------- the item `CurveAffine` is already imported here
...
790 |         arithmetic::{CurveAffine, CurveExt},
    |                      ^^^^^^^^^^^

Check warning on line 2938 in src/constants/fixed_bases/value_commit_r.rs

See this annotation in the file changed.

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

the item `pallas` is imported redundantly

warning: the item `pallas` is imported redundantly
    --> src/constants/fixed_bases/value_commit_r.rs:2938:9
     |
2933 |     use super::*;
     |         -------- the item `pallas` is already imported here
...
2938 |         pallas,
     |         ^^^^^^

Check warning on line 2937 in src/constants/fixed_bases/value_commit_r.rs

See this annotation in the file changed.

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

the item `CurveAffine` is imported redundantly

warning: the item `CurveAffine` is imported redundantly
    --> src/constants/fixed_bases/value_commit_r.rs:2937:22
     |
2933 |     use super::*;
     |         -------- the item `CurveAffine` is already imported here
...
2937 |         arithmetic::{CurveAffine, CurveExt},
     |                      ^^^^^^^^^^^

Check warning on line 2938 in src/constants/fixed_bases/spend_auth_g.rs

See this annotation in the file changed.

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

the item `pallas` is imported redundantly

warning: the item `pallas` is imported redundantly
    --> src/constants/fixed_bases/spend_auth_g.rs:2938:9
     |
2933 |     use super::*;
     |         -------- the item `pallas` is already imported here
...
2938 |         pallas,
     |         ^^^^^^

Check warning on line 2937 in src/constants/fixed_bases/spend_auth_g.rs

See this annotation in the file changed.

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

the item `CurveAffine` is imported redundantly

warning: the item `CurveAffine` is imported redundantly
    --> src/constants/fixed_bases/spend_auth_g.rs:2937:22
     |
2933 |     use super::*;
     |         -------- the item `CurveAffine` is already imported here
...
2937 |         arithmetic::{CurveAffine, CurveExt},
     |                      ^^^^^^^^^^^

Check warning on line 2934 in src/constants/fixed_bases/nullifier_k.rs

See this annotation in the file changed.

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

the item `pallas` is imported redundantly

warning: the item `pallas` is imported redundantly
    --> src/constants/fixed_bases/nullifier_k.rs:2934:46
     |
2931 |     use super::*;
     |         -------- the item `pallas` is already imported here
...
2934 |     use pasta_curves::{arithmetic::CurveExt, pallas};
     |                                              ^^^^^^

Check warning on line 2939 in src/constants/fixed_bases/note_commit_r.rs

See this annotation in the file changed.

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

the item `pallas` is imported redundantly

warning: the item `pallas` is imported redundantly
    --> src/constants/fixed_bases/note_commit_r.rs:2939:49
     |
2932 |     use super::*;
     |         -------- the item `pallas` is already imported here
...
2939 |     use pasta_curves::{arithmetic::CurveAffine, pallas};
     |                                                 ^^^^^^

Check warning on line 2939 in src/constants/fixed_bases/note_commit_r.rs

See this annotation in the file changed.

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

the item `CurveAffine` is imported redundantly

warning: the item `CurveAffine` is imported redundantly
    --> src/constants/fixed_bases/note_commit_r.rs:2939:24
     |
2932 |     use super::*;
     |         -------- the item `CurveAffine` is already imported here
...
2939 |     use pasta_curves::{arithmetic::CurveAffine, pallas};
     |                        ^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 2938 in src/constants/fixed_bases/commit_ivk_r.rs

See this annotation in the file changed.

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

the item `pallas` is imported redundantly

warning: the item `pallas` is imported redundantly
    --> src/constants/fixed_bases/commit_ivk_r.rs:2938:49
     |
2932 |     use super::*;
     |         -------- the item `pallas` is already imported here
...
2938 |     use pasta_curves::{arithmetic::CurveAffine, pallas};
     |                                                 ^^^^^^