Skip to content

CI

CI #1

GitHub Actions / clippy-mithril-aggregator failed Nov 13, 2023 in 0s

clippy-mithril-aggregator

3 errors, 20 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 3
Warning 20
Note 0
Help 0

Versions

  • rustc 1.73.0 (cc66ad468 2023-10-03)
  • cargo 1.73.0 (9c4383fb5 2023-08-26)
  • clippy 0.1.73 (cc66ad4 2023-10-03)

Annotations

Check failure on line 430 in mithril-core/src/multi_sig_zcash.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

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

error: incorrect implementation of `partial_cmp` on an `Ord` type
   --> mithril-core/src/multi_sig_zcash.rs:426:1
    |
426 | /  impl PartialOrd for Signature {
427 | |      fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
    | | _____________________________________________________________-
428 | ||         Some(self.cmp_msp_sig(other))
429 | ||     }
    | ||_____- help: change this to: `{ Some(std::cmp::Ord::cmp(self, other)) }`
430 | |  }
    | |__^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incorrect_partial_ord_impl_on_ord_type

Check warning on line 403 in mithril-core/src/multi_sig_zcash.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> mithril-core/src/multi_sig_zcash.rs:403:27
    |
403 |             hasher.update(&index.to_be_bytes());
    |                           ^^^^^^^^^^^^^^^^^^^^ help: change this to: `index.to_be_bytes()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 393 in mithril-core/src/multi_sig_zcash.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> mithril-core/src/multi_sig_zcash.rs:393:31
    |
393 |                 hasher.update(&index.to_be_bytes());
    |                               ^^^^^^^^^^^^^^^^^^^^ help: change this to: `index.to_be_bytes()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 384 in mithril-core/src/multi_sig_zcash.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> mithril-core/src/multi_sig_zcash.rs:384:32
    |
384 |             hashed_sigs.update(&sig.to_bytes());
    |                                ^^^^^^^^^^^^^^^ help: change this to: `sig.to_bytes()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 381 in mithril-core/src/multi_sig_zcash.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
   --> mithril-core/src/multi_sig_zcash.rs:381:10
    |
381 |     ) -> Result<(), MultiSignatureError> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: mithril-core/src/error.rs:18:5
    |
18  |     SignatureInvalid(Signature),
    |     --------------------------- the largest variant contains at least 144 bytes
    |
    = help: try reducing the size of `error::MultiSignatureError`, for example by boxing large elements or replacing it with `Box<error::MultiSignatureError>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check warning on line 345 in mithril-core/src/multi_sig_zcash.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
   --> mithril-core/src/multi_sig_zcash.rs:345:40
    |
345 |     pub fn from_bytes(bytes: &[u8]) -> Result<Self, MultiSignatureError> {
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: mithril-core/src/error.rs:18:5
    |
18  |     SignatureInvalid(Signature),
    |     --------------------------- the largest variant contains at least 144 bytes
    |
    = help: try reducing the size of `error::MultiSignatureError`, for example by boxing large elements or replacing it with `Box<error::MultiSignatureError>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check warning on line 328 in mithril-core/src/multi_sig_zcash.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> mithril-core/src/multi_sig_zcash.rs:328:20
    |
328 |             .chain(&self.to_bytes())
    |                    ^^^^^^^^^^^^^^^^ help: change this to: `self.to_bytes()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 327 in mithril-core/src/multi_sig_zcash.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> mithril-core/src/multi_sig_zcash.rs:327:20
    |
327 |             .chain(&index.to_le_bytes())
    |                    ^^^^^^^^^^^^^^^^^^^^ help: change this to: `index.to_le_bytes()`
    |
    = 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 305 in mithril-core/src/multi_sig_zcash.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
   --> mithril-core/src/multi_sig_zcash.rs:305:64
    |
305 |     pub fn verify(&self, msg: &[u8], mvk: &VerificationKey) -> Result<(), MultiSignatureError> {
    |                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: mithril-core/src/error.rs:18:5
    |
18  |     SignatureInvalid(Signature),
    |     --------------------------- the largest variant contains at least 144 bytes
    |
    = help: try reducing the size of `error::MultiSignatureError`, for example by boxing large elements or replacing it with `Box<error::MultiSignatureError>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check warning on line 284 in mithril-core/src/multi_sig_zcash.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
   --> mithril-core/src/multi_sig_zcash.rs:284:40
    |
284 |     pub fn from_bytes(bytes: &[u8]) -> Result<Self, MultiSignatureError> {
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: mithril-core/src/error.rs:18:5
    |
18  |     SignatureInvalid(Signature),
    |     --------------------------- the largest variant contains at least 144 bytes
    |
    = help: try reducing the size of `error::MultiSignatureError`, for example by boxing large elements or replacing it with `Box<error::MultiSignatureError>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check warning on line 252 in mithril-core/src/multi_sig_zcash.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
   --> mithril-core/src/multi_sig_zcash.rs:252:28
    |
252 |     pub fn check(&self) -> Result<(), MultiSignatureError> {
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: mithril-core/src/error.rs:18:5
    |
18  |     SignatureInvalid(Signature),
    |     --------------------------- the largest variant contains at least 144 bytes
    |
    = help: try reducing the size of `error::MultiSignatureError`, for example by boxing large elements or replacing it with `Box<error::MultiSignatureError>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check warning on line 212 in mithril-core/src/multi_sig_zcash.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
   --> mithril-core/src/multi_sig_zcash.rs:212:40
    |
212 |     pub fn from_bytes(bytes: &[u8]) -> Result<Self, MultiSignatureError> {
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: mithril-core/src/error.rs:18:5
    |
18  |     SignatureInvalid(Signature),
    |     --------------------------- the largest variant contains at least 144 bytes
    |
    = help: try reducing the size of `error::MultiSignatureError`, for example by boxing large elements or replacing it with `Box<error::MultiSignatureError>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check failure on line 166 in mithril-core/src/multi_sig_zcash.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

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

error: incorrect implementation of `partial_cmp` on an `Ord` type
   --> mithril-core/src/multi_sig_zcash.rs:162:1
    |
162 | /  impl PartialOrd for VerificationKey {
163 | |      fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
    | | _____________________________________________________________-
164 | ||         Some(self.cmp_msp_mvk(other))
165 | ||     }
    | ||_____- help: change this to: `{ Some(std::cmp::Ord::cmp(self, other)) }`
166 | |  }
    | |__^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incorrect_partial_ord_impl_on_ord_type

Check warning on line 103 in mithril-core/src/multi_sig_zcash.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
   --> mithril-core/src/multi_sig_zcash.rs:103:40
    |
103 |     pub fn from_bytes(bytes: &[u8]) -> Result<Self, MultiSignatureError> {
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: mithril-core/src/error.rs:18:5
    |
18  |     SignatureInvalid(Signature),
    |     --------------------------- the largest variant contains at least 144 bytes
    |
    = help: try reducing the size of `error::MultiSignatureError`, for example by boxing large elements or replacing it with `Box<error::MultiSignatureError>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check warning on line 80 in mithril-core/src/multi_sig_zcash.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
  --> mithril-core/src/multi_sig_zcash.rs:80:40
   |
80 |     pub fn from_bytes(bytes: &[u8]) -> Result<Self, MultiSignatureError> {
   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
  ::: mithril-core/src/error.rs:18:5
   |
18 |     SignatureInvalid(Signature),
   |     --------------------------- the largest variant contains at least 144 bytes
   |
   = help: try reducing the size of `error::MultiSignatureError`, for example by boxing large elements or replacing it with `Box<error::MultiSignatureError>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check warning on line 853 in mithril-core/src/stm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
   --> mithril-core/src/stm.rs:853:40
    |
853 |     pub fn from_bytes(bytes: &[u8]) -> Result<StmAggrSig<D>, StmSignatureError<D>> {
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: mithril-core/src/error.rs:42:5
    |
42  |     IvkInvalid(VerificationKey),
    |     --------------------------- the largest variant contains at least 288 bytes
...
46  |     SumInvalid(Signature),
    |     --------------------- the variant `SumInvalid` contains at least 144 bytes
...
70  |     SingleSignatureInvalid(Signature),
    |     --------------------------------- the variant `SingleSignatureInvalid` contains at least 144 bytes
    |
    = help: try reducing the size of `error::StmSignatureError<D>`, for example by boxing large elements or replacing it with `Box<error::StmSignatureError<D>>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check warning on line 779 in mithril-core/src/stm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
   --> mithril-core/src/stm.rs:779:10
    |
779 |     ) -> Result<(), StmSignatureError<D>> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: mithril-core/src/error.rs:42:5
    |
42  |     IvkInvalid(VerificationKey),
    |     --------------------------- the largest variant contains at least 288 bytes
...
46  |     SumInvalid(Signature),
    |     --------------------- the variant `SumInvalid` contains at least 144 bytes
...
70  |     SingleSignatureInvalid(Signature),
    |     --------------------------------- the variant `SingleSignatureInvalid` contains at least 144 bytes
    |
    = help: try reducing the size of `error::StmSignatureError<D>`, for example by boxing large elements or replacing it with `Box<error::StmSignatureError<D>>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check warning on line 719 in mithril-core/src/stm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
   --> mithril-core/src/stm.rs:719:40
    |
719 |     pub fn from_bytes(bytes: &[u8]) -> Result<StmSig<D>, StmSignatureError<D>> {
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: mithril-core/src/error.rs:42:5
    |
42  |     IvkInvalid(VerificationKey),
    |     --------------------------- the largest variant contains at least 288 bytes
...
46  |     SumInvalid(Signature),
    |     --------------------- the variant `SumInvalid` contains at least 144 bytes
...
70  |     SingleSignatureInvalid(Signature),
    |     --------------------------------- the variant `SingleSignatureInvalid` contains at least 144 bytes
    |
    = help: try reducing the size of `error::StmSignatureError<D>`, for example by boxing large elements or replacing it with `Box<error::StmSignatureError<D>>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check warning on line 679 in mithril-core/src/stm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
   --> mithril-core/src/stm.rs:679:10
    |
679 |     ) -> Result<(), StmSignatureError<D>> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: mithril-core/src/error.rs:42:5
    |
42  |     IvkInvalid(VerificationKey),
    |     --------------------------- the largest variant contains at least 288 bytes
...
46  |     SumInvalid(Signature),
    |     --------------------- the variant `SumInvalid` contains at least 144 bytes
...
70  |     SingleSignatureInvalid(Signature),
    |     --------------------------------- the variant `SingleSignatureInvalid` contains at least 144 bytes
    |
    = help: try reducing the size of `error::StmSignatureError<D>`, for example by boxing large elements or replacing it with `Box<error::StmSignatureError<D>>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

Check warning on line 663 in mithril-core/src/stm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

the `Err`-variant returned from this function is very large

warning: the `Err`-variant returned from this function is very large
   --> mithril-core/src/stm.rs:663:10
    |
663 |     ) -> Result<(), StmSignatureError<D>> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: mithril-core/src/error.rs:42:5
    |
42  |     IvkInvalid(VerificationKey),
    |     --------------------------- the largest variant contains at least 288 bytes
...
46  |     SumInvalid(Signature),
    |     --------------------- the variant `SumInvalid` contains at least 144 bytes
...
70  |     SingleSignatureInvalid(Signature),
    |     --------------------------------- the variant `SingleSignatureInvalid` contains at least 144 bytes
    |
    = help: try reducing the size of `error::StmSignatureError<D>`, for example by boxing large elements or replacing it with `Box<error::StmSignatureError<D>>`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
    = note: `#[warn(clippy::result_large_err)]` on by default

Check warning on line 278 in mithril-core/src/merkle_tree.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> mithril-core/src/merkle_tree.rs:278:32
    |
278 |             hasher: PhantomData::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

Check warning on line 195 in mithril-core/src/merkle_tree.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> mithril-core/src/merkle_tree.rs:195:32
    |
195 |             hasher: PhantomData::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 failure on line 76 in mithril-core/src/merkle_tree.rs

See this annotation in the file changed.

@github-actions github-actions / clippy-mithril-aggregator

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

error: incorrect implementation of `partial_cmp` on an `Ord` type
  --> mithril-core/src/merkle_tree.rs:66:1
   |
66 | /  impl PartialOrd for MTLeaf {
67 | |      /// Ordering of MT Values.
68 | |      ///
69 | |      /// First we order by stake, then by key. By having this ordering,
...  |
73 | |      fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
   | | _____________________________________________________________-
74 | ||         Some(self.1.cmp(&other.1).then(self.0.cmp(&other.0)))
75 | ||     }
   | ||_____- help: change this to: `{ Some(std::cmp::Ord::cmp(self, other)) }`
76 | |  }
   | |__^
   |
   = 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