mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-23 23:51:06 +01:00
remove default feature
This commit is contained in:
parent
25f8a4cfae
commit
21413b7eaf
@ -21,7 +21,7 @@ name = "actix_session"
|
|||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["sled-session"]
|
default = []
|
||||||
cookie-session = []
|
cookie-session = []
|
||||||
sled-session = ["sled"]
|
sled-session = ["sled"]
|
||||||
redis-actor-session = ["actix-redis", "actix", "futures-core", "rand"]
|
redis-actor-session = ["actix-redis", "actix", "futures-core", "rand"]
|
||||||
|
@ -159,6 +159,7 @@ pub mod test_helpers {
|
|||||||
/// Prints name of function it is called in.
|
/// Prints name of function it is called in.
|
||||||
///
|
///
|
||||||
/// Taken from: https://docs.rs/stdext/0.3.1/src/stdext/macros.rs.html
|
/// Taken from: https://docs.rs/stdext/0.3.1/src/stdext/macros.rs.html
|
||||||
|
#[allow(unused_macros)]
|
||||||
macro_rules! function_name {
|
macro_rules! function_name {
|
||||||
() => {{
|
() => {{
|
||||||
// Okay, this is ugly, I get it. However, this is the best we can get on a stable rust.
|
// Okay, this is ugly, I get it. However, this is the best we can get on a stable rust.
|
||||||
@ -171,6 +172,8 @@ pub mod test_helpers {
|
|||||||
&name[..name.len() - 3]
|
&name[..name.len() - 3]
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unused_imports)]
|
||||||
pub(crate) use function_name;
|
pub(crate) use function_name;
|
||||||
|
|
||||||
/// Generate a random cookie signing/encryption key.
|
/// Generate a random cookie signing/encryption key.
|
||||||
|
@ -2,8 +2,7 @@ use std::convert::TryInto as _;
|
|||||||
|
|
||||||
use actix_web::cookie::time::Duration;
|
use actix_web::cookie::time::Duration;
|
||||||
|
|
||||||
use super::{LoadError, SaveError, SessionKey, SessionState, UpdateError};
|
use super::{interface::SessionState, LoadError, SaveError, SessionKey, SessionStore, UpdateError};
|
||||||
use crate::storage::SessionStore;
|
|
||||||
|
|
||||||
/// Use the session key, stored in the session cookie, as storage backend for the session state.
|
/// Use the session key, stored in the session cookie, as storage backend for the session state.
|
||||||
///
|
///
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
mod interface;
|
mod interface;
|
||||||
mod session_key;
|
mod session_key;
|
||||||
|
|
||||||
pub(crate) use self::interface::SessionState;
|
|
||||||
pub use self::interface::{LoadError, SaveError, SessionStore, UpdateError};
|
pub use self::interface::{LoadError, SaveError, SessionStore, UpdateError};
|
||||||
pub use self::session_key::SessionKey;
|
pub use self::session_key::SessionKey;
|
||||||
|
|
||||||
|
@ -2,8 +2,10 @@ use actix::Addr;
|
|||||||
use actix_redis::{resp_array, Command, RedisActor, RespValue};
|
use actix_redis::{resp_array, Command, RedisActor, RespValue};
|
||||||
use actix_web::cookie::time::Duration;
|
use actix_web::cookie::time::Duration;
|
||||||
|
|
||||||
use super::{LoadError, SaveError, SessionKey, SessionState, UpdateError};
|
use super::{
|
||||||
use crate::storage::{utils::generate_session_key, SessionStore};
|
interface::SessionState, utils::generate_session_key, LoadError, SaveError, SessionKey,
|
||||||
|
SessionStore, UpdateError,
|
||||||
|
};
|
||||||
|
|
||||||
/// Use Redis as session storage backend.
|
/// Use Redis as session storage backend.
|
||||||
///
|
///
|
||||||
|
@ -4,8 +4,10 @@ use actix_web::cookie::time::Duration;
|
|||||||
use anyhow::Context as _;
|
use anyhow::Context as _;
|
||||||
use redis::{aio::ConnectionManager, AsyncCommands, Cmd, FromRedisValue, RedisResult, Value};
|
use redis::{aio::ConnectionManager, AsyncCommands, Cmd, FromRedisValue, RedisResult, Value};
|
||||||
|
|
||||||
use super::{LoadError, SaveError, SessionKey, SessionState, UpdateError};
|
use super::{
|
||||||
use crate::storage::{utils::generate_session_key, SessionStore};
|
interface::SessionState, utils::generate_session_key, LoadError, SaveError, SessionKey,
|
||||||
|
SessionStore, UpdateError,
|
||||||
|
};
|
||||||
|
|
||||||
/// Use Redis as session storage backend.
|
/// Use Redis as session storage backend.
|
||||||
///
|
///
|
||||||
|
@ -4,8 +4,8 @@ use actix_web::cookie::time::Duration;
|
|||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
utils::generate_session_key, LoadError, SaveError, SessionKey, SessionState, SessionStore,
|
interface::SessionState, utils::generate_session_key, LoadError, SaveError, SessionKey,
|
||||||
UpdateError,
|
SessionStore, UpdateError,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
|
Loading…
Reference in New Issue
Block a user