From 6e2f076e249d2c837c39815ce086a220a4b1609c Mon Sep 17 00:00:00 2001 From: Julien Cretin Date: Mon, 28 Mar 2022 15:29:15 +0200 Subject: [PATCH] Add documentation for #[cfg] work-around on expressions --- src/ctap/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ctap/mod.rs b/src/ctap/mod.rs index 903449f..555f0b9 100644 --- a/src/ctap/mod.rs +++ b/src/ctap/mod.rs @@ -542,6 +542,8 @@ impl CtapState { // Correct behavior between CTAP1 and CTAP2 isn't defined yet. Just a guess. #[cfg(feature = "with_ctap1")] { + // We create a block statement to wrap this assignment expression, because attributes + // (like #[cfg]) are not supported on expressions. self.u2f_up_state = U2fUserPresenceState::new(U2F_UP_PROMPT_TIMEOUT, TOUCH_TIMEOUT); } self.stateful_command_permission