Skip to content

Commit 7ad2f2e

Browse files
committed
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.
1 parent 05c5937 commit 7ad2f2e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/key.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -638,10 +638,9 @@ impl PublicKey {
638638
/// # }
639639
/// ```
640640
pub fn combine_keys(keys: &[&PublicKey]) -> Result<PublicKey, Error> {
641-
use core::i32::MAX;
642641
use core::mem::transmute;
643642

644-
if keys.is_empty() || keys.len() > MAX as usize {
643+
if keys.is_empty() || keys.len() > i32::MAX as usize {
645644
return Err(InvalidPublicKeySum);
646645
}
647646

0 commit comments

Comments
 (0)