From 5bd5f67d79ff67f0c134f389b155adf448ccc92e Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 6 Apr 2018 12:31:31 -0700 Subject: [PATCH 1/4] add Pause message constructors --- src/client/connector.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/client/connector.rs b/src/client/connector.rs index 0ad066ae8..dbd98bfb6 100644 --- a/src/client/connector.rs +++ b/src/client/connector.rs @@ -78,6 +78,19 @@ pub struct Pause { time: Option, } +impl Pause { + /// Create message with pause duration parameter + fn new(time: Duration) -> Pause { + Pause{time: Some(time)} + } +} + +impl Default for Pause { + fn default() -> Pause { + Pause{time: None} + } +} + impl Message for Pause { type Result = (); } From 2d4ee0ee014744e22ea8bfa2b19c12d5187ccfa8 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 6 Apr 2018 12:34:24 -0700 Subject: [PATCH 2/4] make Pause::new public --- src/client/connector.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/connector.rs b/src/client/connector.rs index dbd98bfb6..5e364ae9f 100644 --- a/src/client/connector.rs +++ b/src/client/connector.rs @@ -80,7 +80,7 @@ pub struct Pause { impl Pause { /// Create message with pause duration parameter - fn new(time: Duration) -> Pause { + pub fn new(time: Duration) -> Pause { Pause{time: Some(time)} } } From 191b53bd7c4ca763467508333e4f0ea00ff93739 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 6 Apr 2018 13:22:27 -0700 Subject: [PATCH 3/4] pin futures 0.1 --- examples/basics/Cargo.toml | 2 +- examples/state/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/basics/Cargo.toml b/examples/basics/Cargo.toml index 76bfa52be..294075d4c 100644 --- a/examples/basics/Cargo.toml +++ b/examples/basics/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Nikolay Kim "] workspace = "../.." [dependencies] -futures = "*" +futures = "0.1" env_logger = "0.5" actix = "0.5" actix-web = { path="../.." } diff --git a/examples/state/Cargo.toml b/examples/state/Cargo.toml index bd3ba2439..a0ac2d281 100644 --- a/examples/state/Cargo.toml +++ b/examples/state/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Nikolay Kim "] workspace = "../.." [dependencies] -futures = "*" +futures = "0.1" env_logger = "0.5" actix = "0.5" actix-web = { path = "../../" } From fdb7419e24bd81c20e249d30c1e9c07214892f12 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 6 Apr 2018 14:11:04 -0700 Subject: [PATCH 4/4] use actix-web from master --- README.md | 8 ++++++++ guide/src/qs_2.md | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6f9a41bca..8e93552fd 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,14 @@ Actix web is a simple, pragmatic, extremely fast, web framework for Rust. ## Example +At the moment all examples uses actix-web master. + +```toml +[dependencies] +actix = "0.5" +actix-web = { git="https://github.com/actix/actix-web.git" } +``` + ```rust extern crate actix_web; use actix_web::{server, App, Path}; diff --git a/guide/src/qs_2.md b/guide/src/qs_2.md index 91fa8ec8b..524c2c1de 100644 --- a/guide/src/qs_2.md +++ b/guide/src/qs_2.md @@ -17,7 +17,7 @@ contains the following: ```toml [dependencies] actix = "0.5" -actix-web = "0.4" +actix-web = { git="https://github.com/actix/actix-web.git" } ``` In order to implement a web server, we first need to create a request handler.