From ca659ae765882594a3e8ca137665c1ff988f99b3 Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Mon, 23 Aug 2021 13:36:13 +0200 Subject: [PATCH] Add comment about simplifying code using to-be-released features. --- Cargo.toml | 2 ++ src/keystore.rs | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index bf069e2..9cad6ba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,6 +28,8 @@ lru = "0.6.6" memmem = "0.1" memoffset = "0.6" num_cpus = "1" +# When bumping the version of Sequoia search the code for XXX to find +# spots where we can take advantage of new features. sequoia-openpgp = "1.3" thiserror = "1" diff --git a/src/keystore.rs b/src/keystore.rs index 95b931f..56b2a74 100644 --- a/src/keystore.rs +++ b/src/keystore.rs @@ -597,6 +597,9 @@ impl Keystore { // key material is not serialized so it is not considered, // but we want to consider secret key material. So, we // need to be a bit smarter. + // + // XXX: Starting in Sequoia 1.4 we will be able to do: + // cert.as_tsk() == other.as_tsk(). match (current.is_tsk(), cert.is_tsk()) { (true, true) => current.clone().into_packets().collect::>()