From 85e2cd3ed124347c3834bc3363fa32d817315a0c Mon Sep 17 00:00:00 2001 From: Conrado Gouvea Date: Mon, 28 Aug 2023 15:50:03 -0300 Subject: [PATCH] fix clippy issues --- frost-ed25519/tests/common_traits_tests.rs | 1 + frost-ed448/tests/common_traits_tests.rs | 1 + frost-p256/tests/common_traits_tests.rs | 1 + frost-ristretto255/tests/common_traits_tests.rs | 1 + frost-secp256k1/tests/common_traits_tests.rs | 1 + gencode/src/main.rs | 2 +- 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/frost-ed25519/tests/common_traits_tests.rs b/frost-ed25519/tests/common_traits_tests.rs index 3eff1d11..93363027 100644 --- a/frost-ed25519/tests/common_traits_tests.rs +++ b/frost-ed25519/tests/common_traits_tests.rs @@ -6,6 +6,7 @@ use frost_ed25519::SigningKey; use helpers::samples; use rand::thread_rng; +#[allow(clippy::unnecessary_literal_unwrap)] fn check_common_traits_for_type(v: T) { // Make sure can be debug-printed. This also catches if the Debug does not // have an endless recursion (a popular mistake). diff --git a/frost-ed448/tests/common_traits_tests.rs b/frost-ed448/tests/common_traits_tests.rs index 85df293e..44f389ad 100644 --- a/frost-ed448/tests/common_traits_tests.rs +++ b/frost-ed448/tests/common_traits_tests.rs @@ -6,6 +6,7 @@ use frost_ed448::SigningKey; use helpers::samples; use rand::thread_rng; +#[allow(clippy::unnecessary_literal_unwrap)] fn check_common_traits_for_type(v: T) { // Make sure can be debug-printed. This also catches if the Debug does not // have an endless recursion (a popular mistake). diff --git a/frost-p256/tests/common_traits_tests.rs b/frost-p256/tests/common_traits_tests.rs index 9e5f1a91..16f52d5b 100644 --- a/frost-p256/tests/common_traits_tests.rs +++ b/frost-p256/tests/common_traits_tests.rs @@ -6,6 +6,7 @@ use frost_p256::SigningKey; use helpers::samples; use rand::thread_rng; +#[allow(clippy::unnecessary_literal_unwrap)] fn check_common_traits_for_type(v: T) { // Make sure can be debug-printed. This also catches if the Debug does not // have an endless recursion (a popular mistake). diff --git a/frost-ristretto255/tests/common_traits_tests.rs b/frost-ristretto255/tests/common_traits_tests.rs index b4ba2b24..a985d0ad 100644 --- a/frost-ristretto255/tests/common_traits_tests.rs +++ b/frost-ristretto255/tests/common_traits_tests.rs @@ -6,6 +6,7 @@ use frost_ristretto255::SigningKey; use helpers::samples; use rand::thread_rng; +#[allow(clippy::unnecessary_literal_unwrap)] fn check_common_traits_for_type(v: T) { // Make sure can be debug-printed. This also catches if the Debug does not // have an endless recursion (a popular mistake). diff --git a/frost-secp256k1/tests/common_traits_tests.rs b/frost-secp256k1/tests/common_traits_tests.rs index a9b98147..6048b480 100644 --- a/frost-secp256k1/tests/common_traits_tests.rs +++ b/frost-secp256k1/tests/common_traits_tests.rs @@ -6,6 +6,7 @@ use frost_secp256k1::SigningKey; use helpers::samples; use rand::thread_rng; +#[allow(clippy::unnecessary_literal_unwrap)] fn check_common_traits_for_type(v: T) { // Make sure can be debug-printed. This also catches if the Debug does not // have an endless recursion (a popular mistake). diff --git a/gencode/src/main.rs b/gencode/src/main.rs index f37564ab..483885a7 100644 --- a/gencode/src/main.rs +++ b/gencode/src/main.rs @@ -206,7 +206,7 @@ fn main() -> ExitCode { // ristretto255 as the canonical base. let original_folder = "frost-ristretto255"; - let mut original_strings: Vec = vec![ + let mut original_strings: Vec = [ "Ristretto255Sha512", "Ristretto group", "Ristretto",