From 6b84fd398e4b8fc1db0bec762c197b7dc763f509 Mon Sep 17 00:00:00 2001 From: Nick Zana Date: Mon, 12 Jun 2023 19:04:12 -0400 Subject: [PATCH] ctap2-proto: Put extensions::cred_protect::Policy serde derivation behind "serde" feature flag --- crates/ctap2-proto/src/extensions/cred_protect.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ctap2-proto/src/extensions/cred_protect.rs b/crates/ctap2-proto/src/extensions/cred_protect.rs index 7f7731f..ba6ce4e 100644 --- a/crates/ctap2-proto/src/extensions/cred_protect.rs +++ b/crates/ctap2-proto/src/extensions/cred_protect.rs @@ -1,6 +1,8 @@ +#[cfg(feature = "serde")] use serde::{Deserialize, Serialize}; -#[derive(Debug, Clone, Copy, Serialize, Deserialize)] +#[derive(Debug, Clone, Copy)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub enum Policy { UserVerificationOptional = 0x01, UserVerificationOptionalWithCredentialIdList = 0x02,