From 7ad2f2e53a958aa3c11bc662727a489a906ddfbe Mon Sep 17 00:00:00 2001 From: Martin Habovstiak Date: Wed, 3 Jul 2024 05:46:18 +0200 Subject: [PATCH] Don't use `core::i32::MAX` This is a legacy constant and it's better to just use `i32::MAX`. Note that one cannot `use` an associated constant so this just removed the import. This is better anyway since it's only used once and it didn't provide meaningful line length reduction. --- src/key.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/key.rs b/src/key.rs index 012f09d36..9a868980d 100644 --- a/src/key.rs +++ b/src/key.rs @@ -638,10 +638,9 @@ impl PublicKey { /// # } /// ``` pub fn combine_keys(keys: &[&PublicKey]) -> Result { - use core::i32::MAX; use core::mem::transmute; - if keys.is_empty() || keys.len() > MAX as usize { + if keys.is_empty() || keys.len() > i32::MAX as usize { return Err(InvalidPublicKeySum); }