From de66b5c776444166c0a6a6e2e422f3bbdfdcc9c9 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 11 Dec 2018 08:20:19 -0800 Subject: [PATCH] fix examples --- Cargo.toml | 10 ++++++++++ actix-connector/Cargo.toml | 7 +------ actix-server/Cargo.toml | 5 ----- actix-utils/Cargo.toml | 7 +------ examples/basic.rs | 9 ++++----- examples/ssl.rs | 10 ++++------ 6 files changed, 20 insertions(+), 28 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a327a7a1a7..40e4831f87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,3 +22,13 @@ members = [ "actix-rt", "actix-utils", ] + +[dev-dependencies] +actix-service = "0.1.1" +actix-codec = "0.1.0" +actix-rt = { path="actix-rt" } +actix-server = { path="actix-server", features=["ssl"] } +env_logger = "0.5" +futures = "0.1.24" +openssl = { version="0.10" } +tokio-openssl = { version="0.3" } diff --git a/actix-connector/Cargo.toml b/actix-connector/Cargo.toml index 4a86ee0495..870dc746b2 100644 --- a/actix-connector/Cargo.toml +++ b/actix-connector/Cargo.toml @@ -29,7 +29,7 @@ ssl = ["openssl", "tokio-openssl"] [dependencies] actix-service = "0.1.1" -actix-codec = { path = "../actix-codec" } +actix-codec = "0.1.0" actix-rt = { path = "../actix-rt" } futures = "0.1" tokio-tcp = "0.1" @@ -40,8 +40,3 @@ trust-dns-resolver = "^0.10.0" # openssl openssl = { version="0.10", optional = true } tokio-openssl = { version="0.3", optional = true } - -[profile.release] -lto = true -opt-level = 3 -codegen-units = 1 diff --git a/actix-server/Cargo.toml b/actix-server/Cargo.toml index 0cb16ff3c9..4f9a0be279 100644 --- a/actix-server/Cargo.toml +++ b/actix-server/Cargo.toml @@ -67,8 +67,3 @@ webpki-roots = { version = "0.15", optional = true } [dev-dependencies] env_logger = "0.5" - -[profile.release] -lto = true -opt-level = 3 -codegen-units = 1 diff --git a/actix-utils/Cargo.toml b/actix-utils/Cargo.toml index 526205797a..94c76aced2 100644 --- a/actix-utils/Cargo.toml +++ b/actix-utils/Cargo.toml @@ -20,15 +20,10 @@ path = "src/lib.rs" [dependencies] actix-service = "0.1.1" -actix-codec = { path = "../actix-codec" } +actix-codec = "0.1.0" actix-rt = { path = "../actix-rt" } # io bytes = "0.4" futures = "0.1" tokio-timer = "0.2.8" - -[profile.release] -lto = true -opt-level = 3 -codegen-units = 1 diff --git a/examples/basic.rs b/examples/basic.rs index 846a6a4ea5..6647f30ada 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -7,15 +7,14 @@ use std::sync::{ }; use std::{env, fmt}; +use actix_codec::{AsyncRead, AsyncWrite}; +use actix_rt::System; +use actix_server::Server; +use actix_service::{IntoNewService, NewService}; use futures::{future, Future}; use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; -use tokio_io::{AsyncRead, AsyncWrite}; use tokio_openssl::SslAcceptorExt; -use actix_net::server::Server; -use actix_rt::System; -use actix_service::{IntoNewService, NewService}; - /// Simple logger service, it just prints fact of the new connections fn logger( stream: T, diff --git a/examples/ssl.rs b/examples/ssl.rs index 68dd97a828..0c0738add3 100644 --- a/examples/ssl.rs +++ b/examples/ssl.rs @@ -3,14 +3,12 @@ use std::sync::{ Arc, }; -use futures::{future, Future}; -use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; -use tokio_io::{AsyncRead, AsyncWrite}; - -use actix_net::server::Server; -use actix_net::ssl; +use actix_codec::{AsyncRead, AsyncWrite}; use actix_rt::System; +use actix_server::{ssl, Server}; use actix_service::NewService; +use futures::{future, Future}; +use openssl::ssl::{SslAcceptor, SslFiletype, SslMethod}; #[derive(Debug)] struct ServiceState {