From bb759d762bfde376fa5a8a08b1d1153a345ab28a Mon Sep 17 00:00:00 2001 From: Peter Goodspeed-Niklaus Date: Tue, 9 Jun 2026 12:51:09 +0200 Subject: [PATCH] chore: session methods do not require a mutable ref to keystore As the `PreKeyStore` trait methods no longer require mutable self references, the `Session` methods also no longer require mutable keystore references. --- src/internal/session.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/internal/session.rs b/src/internal/session.rs index a8da10c..f987384 100644 --- a/src/internal/session.rs +++ b/src/internal/session.rs @@ -473,7 +473,7 @@ impl> Session { #[allow(clippy::type_complexity)] pub async fn init_from_message( ours: I, - store: &mut S, + store: &S, env: &Envelope<'_>, ) -> SessionResult<(Session, Vec), S::Error> { let Message::Keyed(pkmsg) = env.message() else { @@ -533,7 +533,7 @@ impl> Session { pub async fn decrypt( &mut self, - store: &mut S, + store: &S, env: &Envelope<'_>, ) -> SessionResult, S::Error> { match *env.message() { @@ -588,7 +588,7 @@ impl> Session { // See note [no_new_state] for those cases where no prekey has been found. async fn new_state( &self, - store: &mut S, + store: &S, m: &PreKeyMessage<'_>, ) -> SessionResult, S::Error> { let prekey_raw = store