Take iterator in calculate_hash()

Avoids unnecessary allocations.
This commit is contained in:
Lambda 2024-08-26 19:16:51 +00:00
parent cce83beedb
commit f1642c92d1
5 changed files with 24 additions and 33 deletions

View file

@ -1860,7 +1860,7 @@ pub(crate) async fn create_invite_route(
events: vec![pdu.to_room_event()],
txn_id:
base64::engine::general_purpose::URL_SAFE_NO_PAD
.encode(utils::calculate_hash(&[pdu
.encode(utils::calculate_hash([pdu
.event_id()
.as_bytes()]))
.into(),