From 80e8d4fbd521131c2839aaa7f3e700bbddc4160b Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sun, 23 Jan 2022 15:50:19 +0100 Subject: [PATCH] Remove unnecessary copying --- crates/matrix-sdk-crypto/src/verification/sas/helpers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/matrix-sdk-crypto/src/verification/sas/helpers.rs b/crates/matrix-sdk-crypto/src/verification/sas/helpers.rs index 4e50b193f..4f4ce7b25 100644 --- a/crates/matrix-sdk-crypto/src/verification/sas/helpers.rs +++ b/crates/matrix-sdk-crypto/src/verification/sas/helpers.rs @@ -321,7 +321,7 @@ pub fn get_mac_content(sas: &OlmSas, ids: &SasIds, flow_id: &FlowId) -> Outgoing // TODO Add the cross signing master key here if we trust/have it. - let mut keys = mac.keys().cloned().collect::>(); + let mut keys: Vec<_> = mac.keys().map(|s| s.as_str()).collect(); keys.sort(); let keys = sas .calculate_mac(&keys.join(","), &format!("{}KEY_IDS", &info))