mirror of
https://github.com/actix/examples
synced 2025-06-26 17:17:42 +02:00
Use captured args in format string (#558)
This commit is contained in:
@ -65,7 +65,7 @@ async fn logout(session: Session) -> Result<String> {
|
||||
let id: Option<String> = session.get("user_id")?;
|
||||
if let Some(x) = id {
|
||||
session.purge();
|
||||
Ok(format!("Logged out: {}", x))
|
||||
Ok(format!("Logged out: {x}"))
|
||||
} else {
|
||||
Ok("Could not log out anonymous user".into())
|
||||
}
|
||||
|
Reference in New Issue
Block a user