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.
This commit is contained in:
Martin Habovstiak 2024-07-03 05:46:18 +02:00
parent 6648126c69
commit 05a4e3963c
1 changed files with 1 additions and 2 deletions

View File

@ -638,10 +638,9 @@ impl PublicKey {
/// # }
/// ```
pub fn combine_keys(keys: &[&PublicKey]) -> Result<PublicKey, Error> {
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);
}