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:
parent
6648126c69
commit
05a4e3963c
|
@ -638,10 +638,9 @@ impl PublicKey {
|
||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
pub fn combine_keys(keys: &[&PublicKey]) -> Result<PublicKey, Error> {
|
pub fn combine_keys(keys: &[&PublicKey]) -> Result<PublicKey, Error> {
|
||||||
use core::i32::MAX;
|
|
||||||
use core::mem::transmute;
|
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);
|
return Err(InvalidPublicKeySum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue