mirror of
https://github.com/actix/actix-extras.git
synced 2025-03-17 19:02:22 +01:00
Performed cargo fmt
This commit is contained in:
parent
e67e4b027d
commit
f4742847a5
@ -75,20 +75,17 @@ struct SessionInner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Session {
|
impl Session {
|
||||||
|
|
||||||
/// Create an empty session. Appropriate for testing.
|
/// Create an empty session. Appropriate for testing.
|
||||||
///
|
///
|
||||||
/// This session wraps an empty state map and status. It can be instantiated for testing purposes.
|
/// This session wraps an empty state map and status. It can be instantiated for testing purposes.
|
||||||
pub fn empty() -> Session {
|
pub fn empty() -> Session {
|
||||||
let inner = SessionInner{
|
let inner = SessionInner {
|
||||||
state: HashMap::new(),
|
state: HashMap::new(),
|
||||||
status: SessionStatus::default(),
|
status: SessionStatus::default(),
|
||||||
};
|
};
|
||||||
Session(Rc::new(RefCell::new(inner)))
|
Session(Rc::new(RefCell::new(inner)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// Get a `value` from the session.
|
/// Get a `value` from the session.
|
||||||
///
|
///
|
||||||
/// It returns an error if it fails to deserialize as `T` the JSON value associated with `key`.
|
/// It returns an error if it fails to deserialize as `T` the JSON value associated with `key`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user