mirror of
https://github.com/fafhrd91/actix-web
synced 2025-01-19 06:04:40 +01:00
fix session mut borrow lifetime
This commit is contained in:
parent
171a23561e
commit
313396d9b5
@ -86,7 +86,7 @@ impl<'a> Session<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Set a `value` from the session.
|
/// Set a `value` from the session.
|
||||||
pub fn set<T: Serialize>(&'a mut self, key: &str, value: T) -> Result<()> {
|
pub fn set<T: Serialize>(&mut self, key: &str, value: T) -> Result<()> {
|
||||||
self.0.set(key, serde_json::to_string(&value)?);
|
self.0.set(key, serde_json::to_string(&value)?);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user