From d46ce2bdd667f17e56c163e4fdc3296b186fb6e4 Mon Sep 17 00:00:00 2001 From: Alexander Wagner Date: Fri, 6 Sep 2024 11:04:24 +0200 Subject: [PATCH] FIXUP WIP More throughly use SstExtension and Option --- src/hss/definitions.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/hss/definitions.rs b/src/hss/definitions.rs index 1d8d591..d5cb95a 100644 --- a/src/hss/definitions.rs +++ b/src/hss/definitions.rs @@ -116,11 +116,10 @@ impl HssPrivateKey { return hss_expand_aux_data::(Some(aux_data), Some(private_key.seed.as_slice())); } - let opt_l0_top_div = if let Some(sst_extension) = &private_key.sst_option { - Some(sst_extension.l0_top_div()) - } else { - None - }; + let opt_l0_top_div = private_key + .sst_option + .as_ref() + .map(|sst_extension| sst_extension.l0_top_div()); // Shrink input slice let aux_len = hss_get_aux_data_len(aux_data.len(), *top_lms_parameter, opt_l0_top_div);