diff --git a/actix-http/.gitignore b/actix-http/.gitignore
deleted file mode 100644
index 42d0755dd..000000000
--- a/actix-http/.gitignore
+++ /dev/null
@@ -1,14 +0,0 @@
-Cargo.lock
-target/
-guide/build/
-/gh-pages
-
-*.so
-*.out
-*.pyc
-*.pid
-*.sock
-*~
-
-# These are backup files generated by rustfmt
-**/*.rs.bk
diff --git a/actix-http/.travis.yml b/actix-http/.travis.yml
deleted file mode 100644
index 02fbd42c7..000000000
--- a/actix-http/.travis.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-language: rust
-sudo: required
-dist: trusty
-
-cache:
- cargo: true
- apt: true
-
-matrix:
- include:
- - rust: stable
- - rust: beta
- - rust: nightly-2019-03-02
- allow_failures:
- - rust: nightly-2019-03-02
-
-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
-
-before_cache: |
- if [[ "$TRAVIS_RUST_VERSION" == "nightly-2019-03-02" ]]; then
- RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin
- fi
-
-script:
-- cargo clean
-- cargo build --all-features
-- cargo test --all-features
-
-# Upload docs
-after_success:
- - |
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_RUST_VERSION" == "stable" ]]; then
- cargo doc --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 &&
- echo "Uploaded documentation"
- fi
- - |
- if [[ "$TRAVIS_RUST_VERSION" == "nightly-2019-03-02" ]]; then
- taskset -c 0 cargo tarpaulin --features="ssl" --out Xml
- bash <(curl -s https://codecov.io/bash)
- echo "Uploaded code coverage"
- fi
diff --git a/actix-http/Cargo.toml b/actix-http/Cargo.toml
index 427024e24..99d80b0be 100644
--- a/actix-http/Cargo.toml
+++ b/actix-http/Cargo.toml
@@ -12,7 +12,6 @@ categories = ["network-programming", "asynchronous",
"web-programming::http-server",
"web-programming::websocket"]
license = "MIT/Apache-2.0"
-exclude = [".gitignore", ".travis.yml", ".cargo/config", "appveyor.yml"]
edition = "2018"
workspace = ".."
diff --git a/actix-http/src/body.rs b/actix-http/src/body.rs
index e1399e6b4..85717ba85 100644
--- a/actix-http/src/body.rs
+++ b/actix-http/src/body.rs
@@ -7,8 +7,8 @@ use futures::{Async, Poll, Stream};
use crate::error::Error;
#[derive(Debug, PartialEq, Copy, Clone)]
-/// Different type of body
-pub enum BodyLength {
+/// Body size hint
+pub enum BodySize {
None,
Empty,
Sized(usize),
@@ -16,13 +16,13 @@ pub enum BodyLength {
Stream,
}
-impl BodyLength {
+impl BodySize {
pub fn is_eof(&self) -> bool {
match self {
- BodyLength::None
- | BodyLength::Empty
- | BodyLength::Sized(0)
- | BodyLength::Sized64(0) => true,
+ BodySize::None
+ | BodySize::Empty
+ | BodySize::Sized(0)
+ | BodySize::Sized64(0) => true,
_ => false,
}
}
@@ -30,14 +30,14 @@ impl BodyLength {
/// Type that provides this trait can be streamed to a peer.
pub trait MessageBody {
- fn length(&self) -> BodyLength;
+ fn length(&self) -> BodySize;
fn poll_next(&mut self) -> Poll