summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2023-11-23 14:29:19 +0100
committerJustus Winter <justus@sequoia-pgp.org>2023-11-23 14:29:19 +0100
commit14102930e660b06661ffadd047fbcf5ef88ef02f (patch)
tree1317f92e890fa7006d4be270888f9bff50ea98d5
parentc442395c58a0d08ef493e9cb54f09e2eb93058f5 (diff)
net: Improve enum Error, mark as non-exhaustive, fix terminology.
-rw-r--r--net/src/lib.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/src/lib.rs b/net/src/lib.rs
index fc804904..1fd2353f 100644
--- a/net/src/lib.rs
+++ b/net/src/lib.rs
@@ -218,13 +218,11 @@ pub type Result<T> = ::std::result::Result<T, anyhow::Error>;
#[derive(thiserror::Error, Debug)]
/// Errors returned from the network routines.
+#[non_exhaustive]
pub enum Error {
- /// A requested key was not found.
- #[error("Key not found")]
+ /// A requested cert was not found.
+ #[error("Cert not found")]
NotFound,
- /// Mismatched key handle
- #[error("Mismatched key handle, expected {0}")]
- MismatchedKeyHandle(KeyHandle, Cert),
/// A given keyserver URL was malformed.
#[error("Malformed URL; expected hkp: or hkps:")]
MalformedUrl,