From cec7cb470465d724ee10ce9bd06f70a2818a4634 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Ruiz Date: Wed, 22 Jun 2022 13:19:49 +0200 Subject: [PATCH] header: implement Clone for Header This trait is missing for no apparent reason from this type, so implement it to avoid users implement their own depending on the struct's fields. Signed-off-by: Alejandro Martinez Ruiz --- src/header.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/header.rs b/src/header.rs index 2f75a7d1..e311306a 100644 --- a/src/header.rs +++ b/src/header.rs @@ -28,7 +28,7 @@ pub trait JoseHeader { /// Generic [JWT header](https://tools.ietf.org/html/rfc7519#page-11) with /// defined fields for common fields. -#[derive(Default, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct Header { #[serde(rename = "alg")] pub algorithm: AlgorithmType,