From 8315134d78b954af830b114512dbb5de6145dc66 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Mon, 27 Nov 2023 17:30:24 +0100 Subject: rename EmptyIdentity -> DerivingRoot Seems to fit better what the error actually means. --- src/error.rs | 4 ++-- src/kem.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/error.rs b/src/error.rs index a79b8e0..4a5c204 100644 --- a/src/error.rs +++ b/src/error.rs @@ -14,8 +14,8 @@ pub enum Error { /// Error returned when trying to derive the root identity, as there is no parent key for the /// root. - #[error("The supplied identity had no elements")] - EmptyIdentity, + #[error("Cannot derive the root identity")] + DerivingRoot, /// Error when the given ciphertext was malformed. /// diff --git a/src/kem.rs b/src/kem.rs index a8261b6..091247d 100644 --- a/src/kem.rs +++ b/src/kem.rs @@ -298,7 +298,7 @@ impl HybridKem { { let identity = self.mapper.map_identity(identity)?; let Some((child, parent)) = identity.split_last() else { - return Err(Error::EmptyIdentity); + return Err(Error::DerivingRoot); }; let private_key = self .hibe -- cgit v1.2.3