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); }