mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-27 17:22:57 +01:00
Clean up deps and macro_use
(#81)
This commit is contained in:
parent
2ae3c80548
commit
43ababef8f
@ -43,10 +43,9 @@ actix-http = { version = "2.0.0-alpha.3", optional = true }
|
|||||||
actix-service = { version = "1.0.0", optional = true }
|
actix-service = { version = "1.0.0", optional = true }
|
||||||
actix-session = { version = "0.4.0-alpha.1", optional = true }
|
actix-session = { version = "0.4.0-alpha.1", optional = true }
|
||||||
rand = { version = "0.7.0", optional = true }
|
rand = { version = "0.7.0", optional = true }
|
||||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
serde = { version = "1.0.101", optional = true }
|
||||||
serde_json = { version = "1.0.40", optional = true }
|
serde_json = { version = "1.0.40", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
env_logger = "0.7"
|
env_logger = "0.7"
|
||||||
serde_derive = "1.0"
|
serde_derive = "1.0"
|
||||||
serde_json = "1.0"
|
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
#[macro_use]
|
|
||||||
extern crate serde_derive;
|
|
||||||
|
|
||||||
use actix_redis::RedisSession;
|
use actix_redis::RedisSession;
|
||||||
use actix_session::Session;
|
use actix_session::Session;
|
||||||
use actix_web::{
|
use actix_web::{
|
||||||
cookie, middleware, web, App, Error, HttpResponse, HttpServer, Responder,
|
cookie, middleware, web, App, Error, HttpResponse, HttpServer, Responder,
|
||||||
};
|
};
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
struct Credentials {
|
struct Credentials {
|
||||||
|
@ -5,18 +5,12 @@
|
|||||||
//! * [API Documentation (Releases)](https://docs.rs/actix-redis/)
|
//! * [API Documentation (Releases)](https://docs.rs/actix-redis/)
|
||||||
//! * [Chat on gitter](https://gitter.im/actix/actix)
|
//! * [Chat on gitter](https://gitter.im/actix/actix)
|
||||||
//! * Cargo package: [actix-redis](https://crates.io/crates/actix-redis)
|
//! * Cargo package: [actix-redis](https://crates.io/crates/actix-redis)
|
||||||
//! * Minimum supported Rust version: 1.26 or later
|
//! * Minimum supported Rust version: 1.40.0 or later
|
||||||
//!
|
|
||||||
#[macro_use]
|
|
||||||
extern crate log;
|
|
||||||
#[macro_use]
|
|
||||||
extern crate redis_async;
|
|
||||||
#[macro_use]
|
|
||||||
extern crate derive_more;
|
|
||||||
|
|
||||||
mod redis;
|
mod redis;
|
||||||
pub use redis::{Command, RedisActor};
|
pub use redis::{Command, RedisActor};
|
||||||
|
|
||||||
|
use derive_more::{Display, From};
|
||||||
|
|
||||||
#[cfg(feature = "web")]
|
#[cfg(feature = "web")]
|
||||||
mod session;
|
mod session;
|
||||||
#[cfg(feature = "web")]
|
#[cfg(feature = "web")]
|
||||||
|
@ -7,6 +7,7 @@ use actix_utils::oneshot;
|
|||||||
use backoff::backoff::Backoff;
|
use backoff::backoff::Backoff;
|
||||||
use backoff::ExponentialBackoff;
|
use backoff::ExponentialBackoff;
|
||||||
use futures_util::FutureExt;
|
use futures_util::FutureExt;
|
||||||
|
use log::{error, info, warn};
|
||||||
use redis_async::error::Error as RespError;
|
use redis_async::error::Error as RespError;
|
||||||
use redis_async::resp::{RespCodec, RespValue};
|
use redis_async::resp::{RespCodec, RespValue};
|
||||||
use tokio::io::{split, WriteHalf};
|
use tokio::io::{split, WriteHalf};
|
||||||
|
@ -13,6 +13,7 @@ use actix_web::{error, Error, HttpMessage};
|
|||||||
use futures_util::future::{ok, Future, Ready};
|
use futures_util::future::{ok, Future, Ready};
|
||||||
use rand::{distributions::Alphanumeric, rngs::OsRng, Rng};
|
use rand::{distributions::Alphanumeric, rngs::OsRng, Rng};
|
||||||
use redis_async::resp::RespValue;
|
use redis_async::resp::RespValue;
|
||||||
|
use redis_async::resp_array;
|
||||||
use time::{self, Duration, OffsetDateTime};
|
use time::{self, Duration, OffsetDateTime};
|
||||||
|
|
||||||
use crate::redis::{Command, RedisActor};
|
use crate::redis::{Command, RedisActor};
|
||||||
|
Loading…
Reference in New Issue
Block a user