From 25af82c45a01d97ae65011665fa819c0edaa31df Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sat, 6 Oct 2018 21:14:02 -0700 Subject: [PATCH] cleanup dependencies --- .travis.yml | 17 +++-------------- Cargo.toml | 35 +---------------------------------- src/lib.rs | 14 -------------- src/response.rs | 4 +--- 4 files changed, 5 insertions(+), 65 deletions(-) diff --git a/.travis.yml b/.travis.yml index aa8a44f25..feae30596 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,17 +14,6 @@ matrix: allow_failures: - rust: nightly -env: - global: - # - RUSTFLAGS="-C link-dead-code" - - OPENSSL_VERSION=openssl-1.0.2 - -before_install: - - sudo add-apt-repository -y ppa:0k53d-karl-f830m/openssl - - sudo apt-get update -qq - - sudo apt-get install -y openssl libssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev - -# Add clippy before_script: - export PATH=$PATH:~/.cargo/bin @@ -32,12 +21,12 @@ script: - | if [[ "$TRAVIS_RUST_VERSION" != "nightly" ]]; then cargo clean - cargo test --features="ssl,tls,rust-tls" -- --nocapture + cargo test fi - | if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install -f cargo-tarpaulin - RUST_BACKTRACE=1 cargo tarpaulin --features="ssl,tls,rust-tls" --out Xml + RUST_BACKTRACE=1 cargo tarpaulin --out Xml bash <(curl -s https://codecov.io/bash) echo "Uploaded code coverage" fi @@ -46,7 +35,7 @@ script: #after_success: # - | # if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_RUST_VERSION" == "stable" ]]; then -# cargo doc --features "ssl,tls,rust-tls,session" --no-deps && +# cargo doc --features "session" --no-deps && # echo "" > target/doc/index.html && # git clone https://github.com/davisp/ghp-import.git && # ./ghp-import/ghp_import.py -n -p -f -m "Documentation upload" -r https://"$GH_TOKEN"@github.com/"$TRAVIS_REPO_SLUG.git" target/doc && diff --git a/Cargo.toml b/Cargo.toml index 48f199ed8..4e66ff0ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,13 +10,12 @@ repository = "https://github.com/actix/actix-web.git" documentation = "https://actix.rs/api/actix-web/stable/actix_web/" categories = ["network-programming", "asynchronous", "web-programming::http-server", - "web-programming::http-client", "web-programming::websocket"] license = "MIT/Apache-2.0" exclude = [".gitignore", ".travis.yml", ".cargo/config", "appveyor.yml"] [package.metadata.docs.rs] -features = ["tls", "alpn", "rust-tls", "session", "brotli", "flate2-c"] +features = ["session"] [badges] travis-ci = { repository = "actix/actix-web", branch = "master" } @@ -30,18 +29,6 @@ path = "src/lib.rs" [features] default = ["session", "cell"] -# native-tls -tls = ["native-tls", "tokio-tls", "actix-net/tls"] - -# openssl -ssl = ["openssl", "tokio-openssl", "actix-net/ssl"] - -# rustls -rust-tls = ["rustls", "tokio-rustls", "webpki", "webpki-roots", "actix-net/rust-tls"] - -# unix sockets -uds = ["tokio-uds"] - # sessions feature, session require "ring" crate and c compiler session = ["cookie/secure"] @@ -82,31 +69,11 @@ tokio-tcp = "0.1" tokio-timer = "0.2" tokio-current-thread = "0.1" -# native-tls -native-tls = { version="0.2", optional = true } -tokio-tls = { version="0.2", optional = true } - -# openssl -openssl = { version="0.10", optional = true } -tokio-openssl = { version="0.2", optional = true } - -#rustls -rustls = { version = "0.14", optional = true } -tokio-rustls = { version = "0.8", optional = true } -webpki = { version = "0.18", optional = true } -webpki-roots = { version = "0.15", optional = true } - -# unix sockets -tokio-uds = { version="0.2", optional = true } - [dev-dependencies] actix-web = "0.7" env_logger = "0.5" serde_derive = "1.0" -[build-dependencies] -version_check = "0.1" - [profile.release] lto = true opt-level = 3 diff --git a/src/lib.rs b/src/lib.rs index 4ec097266..8a7bcfa43 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -63,21 +63,9 @@ //! //! ## Package feature //! -//! * `tls` - enables ssl support via `native-tls` crate -//! * `ssl` - enables ssl support via `openssl` crate, supports `http/2` -//! * `rust-tls` - enables ssl support via `rustls` crate, supports `http/2` -//! * `uds` - enables support for making client requests via Unix Domain Sockets. -//! Unix only. Not necessary for *serving* requests. //! * `session` - enables session support, includes `ring` crate as //! dependency -//! * `brotli` - enables `brotli` compression support, requires `c` -//! compiler -//! * `flate2-c` - enables `gzip`, `deflate` compression support, requires -//! `c` compiler -//! * `flate2-rust` - experimental rust based implementation for -//! `gzip`, `deflate` compression. //! -#![cfg_attr(actix_nightly, feature(tool_lints))] // #![warn(missing_docs)] #![allow(dead_code)] @@ -114,8 +102,6 @@ extern crate tokio_current_thread; extern crate tokio_io; extern crate tokio_tcp; extern crate tokio_timer; -#[cfg(all(unix, feature = "uds"))] -extern crate tokio_uds; #[cfg(test)] #[macro_use] diff --git a/src/response.rs b/src/response.rs index d0136b408..e834748ef 100644 --- a/src/response.rs +++ b/src/response.rs @@ -942,7 +942,7 @@ mod tests { use http::header::{HeaderValue, CONTENT_TYPE, COOKIE}; use header::ContentEncoding; - use test::TestRequest; + // use test::TestRequest; #[test] fn test_debug() { @@ -1118,8 +1118,6 @@ mod tests { #[test] fn test_into_response() { - let req = TestRequest::default().finish(); - let resp: Response = "test".into(); assert_eq!(resp.status(), StatusCode::OK); assert_eq!(