1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-10-22 01:44:20 +00:00

fix session mut borrow lifetime

This commit is contained in:
Alex Whitney 2018-02-28 19:35:26 +00:00
parent 171a23561e
commit 313396d9b5

View file

@ -86,7 +86,7 @@ impl<'a> Session<'a> {
}
/// 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)?);
Ok(())
}