diff --git a/src/signer.rs b/src/signer.rs index 0e6508c..42e98ba 100644 --- a/src/signer.rs +++ b/src/signer.rs @@ -1,7 +1,7 @@ // Copyright 2020-2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use std::error::Error; +use std::fmt::Display; use async_trait::async_trait; use serde_json::Map; @@ -12,7 +12,7 @@ pub type JsonObject = Map; /// JSON Web Signature (JWS) Signer. #[async_trait] pub trait JwsSigner { - type Error: Error; + type Error: Display; /// Creates a JWS. The algorithm used for signed must be read from `header.alg` property. async fn sign(&self, header: &JsonObject, payload: &JsonObject) -> Result, Self::Error>; }