about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2018-09-04T10·21+0200
committerVincent Ambo <mail@tazj.in>2018-09-04T10·45+0200
commitae409995ca045c77e759a68512125e71b0f14d90 (patch)
treed49cebf0c5c0713af2bae9dbba82cf21349aee52
parent5f8f252f6898ea3c3251365d49ef0b11471ec52b (diff)
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.
-rw-r--r--src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index d96d319c9a89..77c91370a622 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,