simplify thread_rng calls

This commit is contained in:
2024-12-23 18:57:03 -06:00
parent f98c9ccc71
commit fc643e5223
2 changed files with 5 additions and 6 deletions

View File

@@ -10,7 +10,7 @@ use salvo::prelude::{
handler, CatchPanic, Listener, Request, Response, Router, Server, Service, StaticDir,
TcpListener, WebSocketUpgrade,
};
use salvo::websocket::{Message, WebSocket};
use salvo::websocket::WebSocket;
use salvo::writing::Json;
use salvo::Depot;
use tokio::sync::{mpsc, Mutex};
@@ -40,6 +40,8 @@ async fn session_middleware(req: &mut Request, res: &mut Response, depot: &mut D
new_session_id = new_session_id,
"Session provided in cookie, but does not exist"
);
} else {
store.sessions.get_mut(&session_id).unwrap().seen(false);
}
}
Err(parse_error) => {