1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-12-01 02:44:37 +01: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. /// 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(())
} }