diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-10-09 11:22:23 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-10-09 11:22:23 +0200 |
commit | f1e778a9ee3e0dfef2ae3e5d2958526e6b8a8743 (patch) | |
tree | 77ece4240b3db22d14b3f82e78ec98b90a815f7d /openpgp/src/crypto/mem.rs | |
parent | 57fe5bfd6f3edd76a45e3e52ddec8702d34c0e15 (diff) |
openpgp: Don't rely on associate constants.
- Makes the crate compile with 1.39.
Diffstat (limited to 'openpgp/src/crypto/mem.rs')
-rw-r--r-- | openpgp/src/crypto/mem.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/crypto/mem.rs b/openpgp/src/crypto/mem.rs index 102f4db0..f62244fe 100644 --- a/openpgp/src/crypto/mem.rs +++ b/openpgp/src/crypto/mem.rs @@ -300,9 +300,9 @@ pub fn secure_cmp(a: &[u8], b: &[u8]) -> Ordering { memsec::memcmp(a.as_ptr(), b.as_ptr(), min(a.len(), b.len())) }; let ord2 = match ord2 { - 1..=i32::MAX => Ordering::Greater, + 1..=std::i32::MAX => Ordering::Greater, 0 => Ordering::Equal, - i32::MIN..=-1 => Ordering::Less, + std::i32::MIN..=-1 => Ordering::Less, }; if ord1 == Ordering::Equal { ord2 } else { ord1 } |