diff options
author | Nora Widdecke <nora@sequoia-pgp.org> | 2021-11-22 16:00:49 +0100 |
---|---|---|
committer | Nora Widdecke <nora@sequoia-pgp.org> | 2021-11-29 11:53:55 +0100 |
commit | 01590ecf0da6ff45f110edb03988efd3847066f8 (patch) | |
tree | 61607d8eb9648410aa3000e848ad30f02ba6b93c /openpgp/src/crypto/s2k.rs | |
parent | 4ecbe9e0348b2d56e2d5431aac54c342a08ca1a6 (diff) |
Use range syntax.
- Use range syntac instad of manual comparisons. This is arguably
better to read.
- Found by clippy::manual_range_contains.
Diffstat (limited to 'openpgp/src/crypto/s2k.rs')
-rw-r--r-- | openpgp/src/crypto/s2k.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp/src/crypto/s2k.rs b/openpgp/src/crypto/s2k.rs index 98895b5f..40ae2e70 100644 --- a/openpgp/src/crypto/s2k.rs +++ b/openpgp/src/crypto/s2k.rs @@ -552,7 +552,7 @@ mod tests { S2K::Unknown { tag, .. } => (tag > 3 && tag < 100) || tag == 2 || tag > 110, S2K::Private { tag, .. } => - tag >= 100 && tag <= 110, + (100..=110).contains(&tag), _ => true } } |