From 15172c9fa15a89976528a49dde9ce588618ce868 Mon Sep 17 00:00:00 2001 From: Frederik Rothenberger Date: Mon, 20 Nov 2023 10:43:17 +0100 Subject: [PATCH] wip --- src/vc_util/src/lib.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/vc_util/src/lib.rs b/src/vc_util/src/lib.rs index 65b02ed3c9..a10a33a23c 100644 --- a/src/vc_util/src/lib.rs +++ b/src/vc_util/src/lib.rs @@ -88,12 +88,8 @@ pub fn principal_for_did(did: &str) -> Result { did, DID_ICP_PREFIX )); } - Principal::from_text(did.trim_start_matches(DID_ICP_PREFIX)).map_err(|e| { - format!( - "failed to parse DID: {}", - PrincipalError::from(e).to_string() - ) - }) + Principal::from_text(did.trim_start_matches(DID_ICP_PREFIX)) + .map_err(|e| format!("failed to parse DID: {}", e)) } /// Verifies the given JWS-credential as an id_alias-VC and extracts the alias tuple.