mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-28 01:32:57 +01:00
Merge pull request #87 from adwhit/fix-session-set
fix session mut borrow lifetime
This commit is contained in:
commit
d977fe563b
@ -1,5 +1,10 @@
|
||||
# Changes
|
||||
|
||||
## 0.4.1 (2018-03-xx)
|
||||
|
||||
* Fix Session mutable borrow lifetime
|
||||
|
||||
|
||||
## 0.4.0 (2018-02-28)
|
||||
|
||||
* Actix 0.5 compatibility
|
||||
|
@ -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(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user