From 2555c3442754d648c36f0eb32b45f7b87d43529e Mon Sep 17 00:00:00 2001 From: Alexander Andreev Date: Sat, 17 Feb 2018 10:59:21 +0300 Subject: [PATCH 1/2] spelling check --- src/redis.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/redis.rs b/src/redis.rs index ac6efab81..8667cb816 100644 --- a/src/redis.rs +++ b/src/redis.rs @@ -69,7 +69,7 @@ impl Actor for RedisActor { Err(err) => { error!("Can not connect to redis server: {}", err); // re-connect with backoff time. - // we stop currect context, supervisor will restart it. + // we stop current context, supervisor will restart it. if let Some(timeout) = act.backoff.next_backoff() { ctx.run_later(timeout, |_, ctx| ctx.stop()); } else { @@ -80,7 +80,7 @@ impl Actor for RedisActor { .map_err(|err, act, ctx| { error!("Can not connect to redis server: {}", err); // re-connect with backoff time. - // we stop currect context, supervisor will restart it. + // we stop current context, supervisor will restart it. if let Some(timeout) = act.backoff.next_backoff() { ctx.run_later(timeout, |_, ctx| ctx.stop()); } else { From 14cfcb7e8771689ed14495b8c1160efac807d701 Mon Sep 17 00:00:00 2001 From: Alexander Andreev Date: Sat, 17 Feb 2018 21:37:30 +0300 Subject: [PATCH 2/2] added some documentation --- src/lib.rs | 11 ++++++++++- src/redis.rs | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 3df10fbda..cbcd9f502 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,12 @@ +//! Redis integration for Actix framework. +//! +//! ## Documentation +//! * [API Documentation (Development)](http://actix.github.io/actix-redis/actix_redis/) +//! * [API Documentation (Releases)](https://docs.rs/actix-redis/) +//! * [Chat on gitter](https://gitter.im/actix/actix) +//! * Cargo package: [actix-redis](https://crates.io/crates/actix-redis) +//! * Minimum supported Rust version: 1.21 or later +//! extern crate actix; extern crate backoff; extern crate futures; @@ -31,7 +40,7 @@ mod session; #[cfg(feature="web")] pub use session::RedisSessionBackend; - +/// General purpose actix redis error #[derive(Fail, Debug)] pub enum Error { #[fail(display="Redis error {}", _0)] diff --git a/src/redis.rs b/src/redis.rs index 8667cb816..0289e84ce 100644 --- a/src/redis.rs +++ b/src/redis.rs @@ -17,6 +17,7 @@ use redis_async::resp::{RespCodec, RespValue}; use Error; +/// Command for send data to Redis #[derive(Debug)] pub struct Command(pub RespValue); @@ -33,6 +34,7 @@ pub struct RedisActor { } impl RedisActor { + /// Start new `Supervisor` with `RedisActor`. pub fn start>(addr: S) -> Addr { let addr = addr.into();