BLS Signature PR with clippy fixed #2178
reviewdog [clippy] report
reported by reviewdog 🐶
Findings (4)
vm/src/crypto_functions.rs|24 col 18| error[E0433]: failed to resolve: use of undeclared type PublicKey
--> vm/src/crypto_functions.rs:24:18
|
24 | let public = PublicKey::from_bytes(key);
| ^^^^^^^^^ use of undeclared type PublicKey
|
help: consider importing one of these items
|
1 + use blst::min_pk::PublicKey;
|
1 + use blst::min_sig::PublicKey;
|
vm/src/crypto_functions.rs|29 col 37| error[E0308]: mismatched types
--> vm/src/crypto_functions.rs:29:37
|
29 | let sig = Signature::from_bytes(signature);
| --------------------- ^^^^^^^^^ expected &[u8; 64]
, found &[u8]
| |
| arguments to this function are incorrect
|
= note: expected reference &[u8; 64]
found reference &[u8]
note: associated function defined here
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ed25519-2.2.3/src/lib.rs:313:12
|
313 | pub fn from_bytes(bytes: &SignatureBytes) -> Self {
| ^^^^^^^^^^
vm/src/crypto_functions.rs|30 col 12| error[E0599]: no method named is_err
found for struct ed25519_dalek::Signature
in the current scope
--> vm/src/crypto_functions.rs:30:12
|
30 | if sig.is_err() {
| ^^^^^^ method not found in Signature
vm/src/crypto_functions.rs|34 col 42| error[E0599]: no method named unwrap
found for struct ed25519_dalek::Signature
in the current scope
--> vm/src/crypto_functions.rs:34:42
|
34 | public.unwrap().verify(message, &sig.unwrap()).is_ok()
| ^^^^^^ method not found in Signature
Filtered Findings (0)
Annotations
Check failure on line 24 in vm/src/crypto_functions.rs
github-actions / clippy
[clippy] vm/src/crypto_functions.rs#L24
error[E0433]: failed to resolve: use of undeclared type `PublicKey`
--> vm/src/crypto_functions.rs:24:18
|
24 | let public = PublicKey::from_bytes(key);
| ^^^^^^^^^ use of undeclared type `PublicKey`
|
help: consider importing one of these items
|
1 + use blst::min_pk::PublicKey;
|
1 + use blst::min_sig::PublicKey;
|
Raw output
vm/src/crypto_functions.rs:24:18:e:error[E0433]: failed to resolve: use of undeclared type `PublicKey`
--> vm/src/crypto_functions.rs:24:18
|
24 | let public = PublicKey::from_bytes(key);
| ^^^^^^^^^ use of undeclared type `PublicKey`
|
help: consider importing one of these items
|
1 + use blst::min_pk::PublicKey;
|
1 + use blst::min_sig::PublicKey;
|
__END__
Check failure on line 29 in vm/src/crypto_functions.rs
github-actions / clippy
[clippy] vm/src/crypto_functions.rs#L29
error[E0308]: mismatched types
--> vm/src/crypto_functions.rs:29:37
|
29 | let sig = Signature::from_bytes(signature);
| --------------------- ^^^^^^^^^ expected `&[u8; 64]`, found `&[u8]`
| |
| arguments to this function are incorrect
|
= note: expected reference `&[u8; 64]`
found reference `&[u8]`
note: associated function defined here
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ed25519-2.2.3/src/lib.rs:313:12
|
313 | pub fn from_bytes(bytes: &SignatureBytes) -> Self {
| ^^^^^^^^^^
Raw output
vm/src/crypto_functions.rs:29:37:e:error[E0308]: mismatched types
--> vm/src/crypto_functions.rs:29:37
|
29 | let sig = Signature::from_bytes(signature);
| --------------------- ^^^^^^^^^ expected `&[u8; 64]`, found `&[u8]`
| |
| arguments to this function are incorrect
|
= note: expected reference `&[u8; 64]`
found reference `&[u8]`
note: associated function defined here
--> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ed25519-2.2.3/src/lib.rs:313:12
|
313 | pub fn from_bytes(bytes: &SignatureBytes) -> Self {
| ^^^^^^^^^^
__END__
Check failure on line 30 in vm/src/crypto_functions.rs
github-actions / clippy
[clippy] vm/src/crypto_functions.rs#L30
error[E0599]: no method named `is_err` found for struct `ed25519_dalek::Signature` in the current scope
--> vm/src/crypto_functions.rs:30:12
|
30 | if sig.is_err() {
| ^^^^^^ method not found in `Signature`
Raw output
vm/src/crypto_functions.rs:30:12:e:error[E0599]: no method named `is_err` found for struct `ed25519_dalek::Signature` in the current scope
--> vm/src/crypto_functions.rs:30:12
|
30 | if sig.is_err() {
| ^^^^^^ method not found in `Signature`
__END__
Check failure on line 34 in vm/src/crypto_functions.rs
github-actions / clippy
[clippy] vm/src/crypto_functions.rs#L34
error[E0599]: no method named `unwrap` found for struct `ed25519_dalek::Signature` in the current scope
--> vm/src/crypto_functions.rs:34:42
|
34 | public.unwrap().verify(message, &sig.unwrap()).is_ok()
| ^^^^^^ method not found in `Signature`
Raw output
vm/src/crypto_functions.rs:34:42:e:error[E0599]: no method named `unwrap` found for struct `ed25519_dalek::Signature` in the current scope
--> vm/src/crypto_functions.rs:34:42
|
34 | public.unwrap().verify(message, &sig.unwrap()).is_ok()
| ^^^^^^ method not found in `Signature`
__END__