mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-27 09:12:57 +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"
|
||||
|
||||
[features]
|
||||
default = ["sled-session"]
|
||||
default = []
|
||||
cookie-session = []
|
||||
sled-session = ["sled"]
|
||||
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.
|
||||
///
|
||||
/// Taken from: https://docs.rs/stdext/0.3.1/src/stdext/macros.rs.html
|
||||
#[allow(unused_macros)]
|
||||
macro_rules! function_name {
|
||||
() => {{
|
||||
// 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]
|
||||
}};
|
||||
}
|
||||
|
||||
#[allow(unused_imports)]
|
||||
pub(crate) use function_name;
|
||||
|
||||
/// Generate a random cookie signing/encryption key.
|
||||
|
@ -2,8 +2,7 @@ use std::convert::TryInto as _;
|
||||
|
||||
use actix_web::cookie::time::Duration;
|
||||
|
||||
use super::{LoadError, SaveError, SessionKey, SessionState, UpdateError};
|
||||
use crate::storage::SessionStore;
|
||||
use super::{interface::SessionState, LoadError, SaveError, SessionKey, SessionStore, UpdateError};
|
||||
|
||||
/// Use the session key, stored in the session cookie, as storage backend for the session state.
|
||||
///
|
||||
|
@ -3,7 +3,6 @@
|
||||
mod interface;
|
||||
mod session_key;
|
||||
|
||||
pub(crate) use self::interface::SessionState;
|
||||
pub use self::interface::{LoadError, SaveError, SessionStore, UpdateError};
|
||||
pub use self::session_key::SessionKey;
|
||||
|
||||
|
@ -2,8 +2,10 @@ use actix::Addr;
|
||||
use actix_redis::{resp_array, Command, RedisActor, RespValue};
|
||||
use actix_web::cookie::time::Duration;
|
||||
|
||||
use super::{LoadError, SaveError, SessionKey, SessionState, UpdateError};
|
||||
use crate::storage::{utils::generate_session_key, SessionStore};
|
||||
use super::{
|
||||
interface::SessionState, utils::generate_session_key, LoadError, SaveError, SessionKey,
|
||||
SessionStore, UpdateError,
|
||||
};
|
||||
|
||||
/// Use Redis as session storage backend.
|
||||
///
|
||||
|
@ -4,8 +4,10 @@ use actix_web::cookie::time::Duration;
|
||||
use anyhow::Context as _;
|
||||
use redis::{aio::ConnectionManager, AsyncCommands, Cmd, FromRedisValue, RedisResult, Value};
|
||||
|
||||
use super::{LoadError, SaveError, SessionKey, SessionState, UpdateError};
|
||||
use crate::storage::{utils::generate_session_key, SessionStore};
|
||||
use super::{
|
||||
interface::SessionState, utils::generate_session_key, LoadError, SaveError, SessionKey,
|
||||
SessionStore, UpdateError,
|
||||
};
|
||||
|
||||
/// Use Redis as session storage backend.
|
||||
///
|
||||
|
@ -4,8 +4,8 @@ use actix_web::cookie::time::Duration;
|
||||
use async_trait::async_trait;
|
||||
|
||||
use super::{
|
||||
utils::generate_session_key, LoadError, SaveError, SessionKey, SessionState, SessionStore,
|
||||
UpdateError,
|
||||
interface::SessionState, utils::generate_session_key, LoadError, SaveError, SessionKey,
|
||||
SessionStore, UpdateError,
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
|
Loading…
Reference in New Issue
Block a user