From ae409995ca045c77e759a68512125e71b0f14d90 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 4 Sep 2018 12:21:11 +0200 Subject: [PATCH] fix: Handle warning about unused kty & alg fields These fields are only used to constrain deserialisation to the supported values, but have no further effect. `rustc` throws warnings about them not being used, which this commit disables. --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index d96d319c9..77c91370a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -82,6 +82,7 @@ enum KeyType { RSA } /// Representation of a single JSON Web Key. See [RFC /// 7517](https://tools.ietf.org/html/rfc7517#section-4). +#[allow(dead_code)] // kty & alg only constrain deserialisation, but aren't used #[derive(Deserialize)] pub struct JWK { kty: KeyType,