From bbcc8bc7ab2e6640cc30864d138d95074109b206 Mon Sep 17 00:00:00 2001 From: overtrue Date: Sat, 5 Sep 2026 08:35:39 +0800 Subject: [PATCH] fix(ecstore): add missing HashMap import in sealed_credentials test The test module references HashMap in encode_context() but did not import std::collections::HashMap. Changed the function signature to accept BTreeMap (matching the SealScope::encryption_context() return type) and removed the redundant BTreeMap conversion. --- crates/ecstore/src/bucket/sealed_credentials.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/ecstore/src/bucket/sealed_credentials.rs b/crates/ecstore/src/bucket/sealed_credentials.rs index 46a0f79fb..97ba858b4 100644 --- a/crates/ecstore/src/bucket/sealed_credentials.rs +++ b/crates/ecstore/src/bucket/sealed_credentials.rs @@ -203,9 +203,8 @@ mod tests { use parking_lot::Mutex; use std::collections::BTreeMap; - fn encode_context(context: &HashMap) -> String { - let ordered = context.iter().collect::>(); - serde_json::to_string(&ordered).expect("context serializes") + fn encode_context(context: &BTreeMap) -> String { + serde_json::to_string(context).expect("context serializes") } /// Stands in for the KMS-backed sealer: records the context it was called