optimize sha256 interface gather/vector inputs
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
14e3b242df
commit
887ae84f1e
7 changed files with 85 additions and 50 deletions
|
@ -157,12 +157,7 @@ impl Service {
|
|||
|
||||
let previous_shortstatehash = self.get_room_shortstatehash(room_id).await;
|
||||
|
||||
let state_hash = calculate_hash(
|
||||
&state_ids_compressed
|
||||
.iter()
|
||||
.map(|s| &s[..])
|
||||
.collect::<Vec<_>>(),
|
||||
);
|
||||
let state_hash = calculate_hash(state_ids_compressed.iter().map(|s| &s[..]));
|
||||
|
||||
let (shortstatehash, already_existed) = self
|
||||
.services
|
||||
|
|
|
@ -352,12 +352,7 @@ impl Service {
|
|||
.await
|
||||
.ok();
|
||||
|
||||
let state_hash = utils::calculate_hash(
|
||||
&new_state_ids_compressed
|
||||
.iter()
|
||||
.map(|bytes| &bytes[..])
|
||||
.collect::<Vec<_>>(),
|
||||
);
|
||||
let state_hash = utils::calculate_hash(new_state_ids_compressed.iter().map(|bytes| &bytes[..]));
|
||||
|
||||
let (new_shortstatehash, already_existed) = self
|
||||
.services
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue