1
0
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:
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" 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"]

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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