From 1058fbe9a7214540c3e2698e357ff53dbc7603f9 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 29 Sep 2025 03:32:12 +0000 Subject: [PATCH] Use specific key,val buffer sizes for append_to_state (no change to correctness). Signed-off-by: Jason Volk --- src/service/rooms/state/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/service/rooms/state/mod.rs b/src/service/rooms/state/mod.rs index 98424954..db15e0aa 100644 --- a/src/service/rooms/state/mod.rs +++ b/src/service/rooms/state/mod.rs @@ -262,7 +262,8 @@ pub async fn set_event_state( ) )] pub async fn append_to_state(&self, new_pdu: &PduEvent) -> Result { - const BUFSIZE: usize = size_of::(); + const KEY_LEN: usize = size_of::(); + const VAL_LEN: usize = size_of::(); let shorteventid = self .services @@ -277,7 +278,7 @@ pub async fn append_to_state(&self, new_pdu: &PduEvent) -> Result { if let Ok(p) = previous_shortstatehash { self.db .shorteventid_shortstatehash - .aput::(shorteventid, p); + .aput::(shorteventid, p); } match &new_pdu.state_key {