1
0
mirror of https://github.com/actix/examples synced 2024-11-23 22:41:07 +01:00

upgrade to alpha3

This commit is contained in:
Nikolay Kim 2019-04-04 11:37:14 -07:00
parent fbb3dd2c40
commit 86e0f3e02c
36 changed files with 52 additions and 56 deletions

View File

@ -7,7 +7,7 @@ workspace = ".."
[dependencies] [dependencies]
actix = "0.8.0-alpha.2" actix = "0.8.0-alpha.2"
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
actix-redis = { git="https://github.com/actix/actix-redis.git" } actix-redis = { git="https://github.com/actix/actix-redis.git" }
futures = "0.1.23" futures = "0.1.23"
redis-async = "0.4.0" redis-async = "0.4.0"

View File

@ -6,9 +6,9 @@ workspace = ".."
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
actix-files = "0.1.0-alpha.1" actix-files = "0.1.0-alpha.2"
actix-session = "0.1.0-alpha.2" actix-session = "0.1.0-alpha.3"
dotenv = "0.13.0" dotenv = "0.13.0"
env_logger = "0.5.10" env_logger = "0.5.10"
futures = "0.1.22" futures = "0.1.22"

View File

@ -7,7 +7,7 @@ workspace = ".."
[dependencies] [dependencies]
actix-rt = "0.2" actix-rt = "0.2"
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
dotenv = "0.10" dotenv = "0.10"
env_logger = "0.5" env_logger = "0.5"

View File

@ -7,7 +7,7 @@ workspace = ".."
[dependencies] [dependencies]
actix-rt = "0.2" actix-rt = "0.2"
actix-web = { version="1.0.0-alpha.2", features=["ssl"] } actix-web = { version="1.0.0-alpha.3", features=["ssl"] }
futures = "0.1" futures = "0.1"
serde = "1.0.43" serde = "1.0.43"

View File

@ -7,9 +7,9 @@ edition = "2018"
[dependencies] [dependencies]
actix-rt = "0.2" actix-rt = "0.2"
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
actix-files = "0.1.0-alpha.1" actix-files = "0.1.0-alpha.2"
actix-session = "0.1.0-alpha.2" actix-session = "0.1.0-alpha.3"
futures = "0.1.25" futures = "0.1.25"
env_logger = "0.5" env_logger = "0.5"

View File

@ -6,5 +6,5 @@ edition = "2018"
workspace = ".." workspace = ".."
[dependencies] [dependencies]
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
env_logger = "0.6" env_logger = "0.6"

View File

@ -6,8 +6,8 @@ workspace = ".."
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
actix-session = "0.1.0-alpha.2" actix-session = "0.1.0-alpha.3"
futures = "0.1" futures = "0.1"
time = "0.1" time = "0.1"

View File

@ -6,7 +6,7 @@ workspace = ".."
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
bytes = "0.4" bytes = "0.4"
env_logger = "0.6" env_logger = "0.6"

View File

@ -6,7 +6,7 @@ edition = "2018"
workspace = ".." workspace = ".."
[dependencies] [dependencies]
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
derive_more = "0.14.0" derive_more = "0.14.0"
futures = "0.1.23" futures = "0.1.23"

View File

@ -6,7 +6,7 @@ edition = "2018"
workspace = ".." workspace = ".."
[dependencies] [dependencies]
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
serde = "1.0" serde = "1.0"
serde_derive = "1.0" serde_derive = "1.0"

View File

@ -6,5 +6,5 @@ workspace = ".."
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
env_logger = "0.6" env_logger = "0.6"

View File

@ -7,7 +7,7 @@ edition = "2018"
[dependencies] [dependencies]
actix-rt = "0.2" actix-rt = "0.2"
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
clap = "2.32.0" clap = "2.32.0"
futures = "0.1.25" futures = "0.1.25"

View File

@ -16,7 +16,7 @@ fn forward(
new_url.set_query(req.uri().query()); new_url.set_query(req.uri().query());
let forwarded_req = client let forwarded_req = client
.request_from(new_url.as_str(), &req) .request_from(new_url.as_str(), req.head())
.no_default_headers(); .no_default_headers();
// if let Some(addr) = req.peer_addr() { // if let Some(addr) = req.peer_addr() {

View File

@ -15,7 +15,7 @@ path = "src/server.rs"
[dependencies] [dependencies]
actix-rt = "0.2" actix-rt = "0.2"
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
env_logger = "0.5" env_logger = "0.5"
futures = "0.1" futures = "0.1"

View File

@ -8,7 +8,7 @@ fn index(client: web::Data<Client>) -> impl Future<Item = HttpResponse, Error =
.get("http://127.0.0.1:8081/") .get("http://127.0.0.1:8081/")
.send() .send()
.map_err(Error::from) // <- convert SendRequestError to an Error .map_err(Error::from) // <- convert SendRequestError to an Error
.and_then(|resp| { .and_then(|mut resp| {
resp.body() // <- this is MessageBody type, resolves to complete body resp.body() // <- this is MessageBody type, resolves to complete body
.from_err() // <- convert PayloadError to an Error .from_err() // <- convert PayloadError to an Error
.and_then(|body| { .and_then(|body| {

View File

@ -6,7 +6,7 @@ workspace = ".."
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
bytes = "0.4" bytes = "0.4"
futures = "0.1" futures = "0.1"

View File

@ -6,7 +6,7 @@ workspace = ".."
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
env_logger = "0.6" env_logger = "0.6"
futures = "0.1" futures = "0.1"
serde = "1.0" serde = "1.0"

View File

@ -7,6 +7,6 @@ workspace = ".."
[dependencies] [dependencies]
actix-service = "0.3.3" actix-service = "0.3.3"
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
futures = "0.1.25" futures = "0.1.25"
env_logger = "0.6" env_logger = "0.6"

View File

@ -10,7 +10,7 @@ name = "multipart"
path = "src/main.rs" path = "src/main.rs"
[dependencies] [dependencies]
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
env_logger = "0.6" env_logger = "0.6"
futures = "0.1.25" futures = "0.1.25"

View File

@ -19,6 +19,7 @@ pub fn save_file(field: web::MultipartField) -> impl Future<Item = i64, Error =
Either::B( Either::B(
field field
.fold(0i64, move |acc, bytes| { .fold(0i64, move |acc, bytes| {
println!("CHUNK: {:?}", bytes.len());
file.write_all(bytes.as_ref()) file.write_all(bytes.as_ref())
.map(|_| acc + bytes.len() as i64) .map(|_| acc + bytes.len() as i64)
.map_err(|e| { .map_err(|e| {

View File

@ -13,4 +13,4 @@ derive_more = "0.14"
prost = "0.2.0" prost = "0.2.0"
prost-derive = "0.2.0" prost-derive = "0.2.0"
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"

View File

@ -7,7 +7,7 @@ workspace = ".."
[dependencies] [dependencies]
actix-rt = "0.2" actix-rt = "0.2"
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
futures = "0.1" futures = "0.1"
env_logger = "0.6" env_logger = "0.6"

View File

@ -7,7 +7,7 @@ edition = "2018"
[dependencies] [dependencies]
actix = "0.8.0-alpha.2" actix = "0.8.0-alpha.2"
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
actix-session = "0.1.0-alpha.2" actix-session = "0.1.0-alpha.3"
actix-redis = { git = "https://github.com/actix/actix-redis.git", features = ["web"] } actix-redis = { git = "https://github.com/actix/actix-redis.git", features = ["web"] }
env_logger = "0.6" env_logger = "0.6"

View File

@ -12,5 +12,5 @@ path = "src/main.rs"
[dependencies] [dependencies]
env_logger = "0.5" env_logger = "0.5"
rustls = "0.15" rustls = "0.15"
actix-web = { version = "1.0.0-alpha.2", features=["rust-tls"] } actix-web = { version = "1.0.0-alpha.3", features=["rust-tls"] }
actix-files = "0.1.0-alpha.1" actix-files = "0.1.0-alpha.2"

View File

@ -8,8 +8,8 @@ workspace = ".."
[dependencies] [dependencies]
actix = { version = "0.8.0-alpha.2", features = ["http"] } actix = { version = "0.8.0-alpha.2", features = ["http"] }
actix-rt = "0.2.2" actix-rt = "0.2.2"
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
actix-files = "0.1.0-alpha.1" actix-files = "0.1.0-alpha.2"
bcrypt = "0.2.1" bcrypt = "0.2.1"
chrono = { version = "0.4.6", features = ["serde"] } chrono = { version = "0.4.6", features = ["serde"] }

View File

@ -6,6 +6,6 @@ workspace = ".."
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
futures = "0.1.25" futures = "0.1.25"
env_logger = "0.6" env_logger = "0.6"

View File

@ -9,5 +9,5 @@ edition = "2018"
futures = "0.1" futures = "0.1"
env_logger = "0.5" env_logger = "0.5"
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
actix-files = "0.1.0-alpha.1" actix-files = "0.1.0-alpha.2"

View File

@ -7,7 +7,7 @@ edition = "2018"
[dependencies] [dependencies]
#askama = { version = "0.8", features = ["with-actix-web"] } #askama = { version = "0.8", features = ["with-actix-web"] }
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
env_logger = "0.6" env_logger = "0.6"
askama = "0.8" askama = "0.8"

View File

@ -1,5 +0,0 @@
extern crate askama;
fn main() {
askama::rerun_if_templates_changed();
}

View File

@ -8,4 +8,4 @@ edition = "2018"
[dependencies] [dependencies]
env_logger = "0.6" env_logger = "0.6"
tera = "0.11" tera = "0.11"
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"

View File

@ -12,12 +12,12 @@ env_logger = "0.6"
yarte = { version = "0.2", features=["with-actix-web"] } yarte = { version = "0.2", features=["with-actix-web"] }
actix-web = "1.0.0-alpha" actix-web = "1.0.0-alpha.3"
[build-dependencies] [build-dependencies]
yarte = { version = "0.2", features=["with-actix-web"] } yarte = { version = "0.2", features=["with-actix-web"] }
[dev-dependencies] [dev-dependencies]
bytes = "0.4" bytes = "0.4"
actix-http-test = "0.1.0-alpha" actix-http-test = "0.1.0-alpha.3"
actix-http = "0.1.0-alpha" actix-http = "0.1.0-alpha.3"

View File

@ -11,6 +11,6 @@ path = "src/main.rs"
[dependencies] [dependencies]
actix-rt = "0.2" actix-rt = "0.2"
actix-web = { version="1.0.0-alpha.2", features=["ssl"] } actix-web = { version="1.0.0-alpha.3", features=["ssl"] }
env_logger = "0.6" env_logger = "0.6"
openssl = { version="0.10" } openssl = { version="0.10" }

View File

@ -6,7 +6,7 @@ workspace = "../../"
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
serde = "1.0" serde = "1.0"
serde_derive = "1.0" serde_derive = "1.0"
serde_json = "1.0" serde_json = "1.0"

View File

@ -11,9 +11,9 @@ path = "src/main.rs"
[dependencies] [dependencies]
actix = "0.8.0-alpha.2" actix = "0.8.0-alpha.2"
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
actix-web-actors = "1.0.0-alpha.2" actix-web-actors = "1.0.0-alpha.3"
actix-files = "0.1.0-alpha.1" actix-files = "0.1.0-alpha.2"
rand = "0.6" rand = "0.6"
bytes = "0.4" bytes = "0.4"

View File

@ -15,9 +15,9 @@ path = "src/client.rs"
[dependencies] [dependencies]
actix = "0.8.0-alpha.2" actix = "0.8.0-alpha.2"
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
actix-web-actors = "1.0.0-alpha.2" actix-web-actors = "1.0.0-alpha.3"
actix-files = "0.1.0-alpha.1" actix-files = "0.1.0-alpha.2"
rand = "0.6" rand = "0.6"
bytes = "0.4" bytes = "0.4"

View File

@ -15,9 +15,9 @@ path = "src/main.rs"
[dependencies] [dependencies]
actix = "0.8.0-alpha.2" actix = "0.8.0-alpha.2"
actix-web = "1.0.0-alpha.2" actix-web = "1.0.0-alpha.3"
actix-web-actors = "1.0.0-alpha.2" actix-web-actors = "1.0.0-alpha.3"
actix-files = "0.1.0-alpha.1" actix-files = "0.1.0-alpha.2"
env_logger = "0.6" env_logger = "0.6"
futures = "0.1" futures = "0.1"
bytes = "0.4" bytes = "0.4"