From 9e147093ec77e3e49c1f56038c5e41d871fab5c3 Mon Sep 17 00:00:00 2001 From: Fimeg Date: Tue, 18 Aug 2026 11:01:37 -0400 Subject: [PATCH] handlers: session_or_hydrate returns the dashmap guard, not Arc the session index holds values; get() hands back a Ref tied to the map borrow. The Arc-typed helper was a type error on its first CI run. --- src/api/handlers.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/api/handlers.rs b/src/api/handlers.rs index 9837735..c4716da 100644 --- a/src/api/handlers.rs +++ b/src/api/handlers.rs @@ -4,10 +4,11 @@ use crate::server::SouveraineServer; /// Resolve a session, hydrating from disk when a freshly booted server has /// not loaded this conversation yet. Surfaces hold conversation ids, not a /// map; a restart must answer a held id without a prior listing. -async fn session_or_hydrate( - server: &SouveraineServer, +async fn session_or_hydrate<'a>( + server: &'a SouveraineServer, id: &str, -) -> Result, ApiError> { +) -> Result, ApiError> +{ if let Some(session) = server.sessions.get(id) { return Ok(session); }