From 40191285d73801578b9659026658aa2857f4751e Mon Sep 17 00:00:00 2001 From: Denis Kolegov Date: Fri, 5 Apr 2024 12:05:22 +0200 Subject: [PATCH] remove or move unused imports --- node/libs/crypto/src/bls12_381/tests.rs | 3 --- node/libs/crypto/src/bn254/mod.rs | 2 +- node/libs/crypto/src/ed25519/tests.rs | 7 +++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/node/libs/crypto/src/bls12_381/tests.rs b/node/libs/crypto/src/bls12_381/tests.rs index 081472ee..1dbe0271 100644 --- a/node/libs/crypto/src/bls12_381/tests.rs +++ b/node/libs/crypto/src/bls12_381/tests.rs @@ -1,9 +1,6 @@ use super::*; use rand::{rngs::StdRng, Rng, SeedableRng}; use std::iter::repeat_with; -use std::ops::Deref; -use anyhow::__private::kind::TraitKind; -use thiserror::__private::AsDynError; // Test signing and verifying a random message #[test] diff --git a/node/libs/crypto/src/bn254/mod.rs b/node/libs/crypto/src/bn254/mod.rs index 9eb923f8..f781b91e 100644 --- a/node/libs/crypto/src/bn254/mod.rs +++ b/node/libs/crypto/src/bn254/mod.rs @@ -154,7 +154,7 @@ impl Signature { /// /// This function is intentionally non-generic and disallow inlining to ensure that compilation optimizations can be effectively applied. /// This optimization is needed for ensuring that tests can run within a reasonable time frame. - /// + /// /// Subgroup checks for signatures are unnecessary when using the G1 group because it has a cofactor of 1, /// ensuring all signatures are in the correct subgroup. /// Ref: https://hackmd.io/@jpw/bn254#Subgroup-check-for-mathbb-G_1. diff --git a/node/libs/crypto/src/ed25519/tests.rs b/node/libs/crypto/src/ed25519/tests.rs index af625c71..6b1127ce 100644 --- a/node/libs/crypto/src/ed25519/tests.rs +++ b/node/libs/crypto/src/ed25519/tests.rs @@ -1,9 +1,8 @@ -use ed25519_dalek::{ - Signature, Signer, SigningKey, VerifyingKey, PUBLIC_KEY_LENGTH, SECRET_KEY_LENGTH, -}; -use hex::FromHex; #[test] fn test_ed25519() -> Result<(), Box> { + use ed25519_dalek::{ + Signature, Signer, SigningKey, VerifyingKey, PUBLIC_KEY_LENGTH, SECRET_KEY_LENGTH, + }; // Test vectors obtained from https://github.com/dalek-cryptography/ed25519-dalek/blob/main/TESTVECTORS. let test_vectors: Vec<(Vec, Vec, Vec, Vec)> = vec![ (