1
0
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:
Rob Ede 2022-07-31 06:14:28 +01:00
parent 25f8a4cfae
commit 21413b7eaf
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
7 changed files with 15 additions and 10 deletions

View File

@ -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"]

View File

@ -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.

View File

@ -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.
///

View File

@ -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;

View File

@ -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.
///

View File

@ -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.
///

View File

@ -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)]