Fix rustfmt check (#927)

* Add set -e to .travis.yml
* Fix fmt
* Fix codec feature
This commit is contained in:
Carl Lerche 2019-02-24 15:41:26 -08:00 committed by GitHub
parent 0e2e07812a
commit dbb04e310c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 5 deletions

View File

@ -27,7 +27,11 @@ matrix:
# Test combinations of enabled features and rustfmt # Test combinations of enabled features and rustfmt
- rust: stable - rust: stable
before_script: |
rustup component add rustfmt
script: | script: |
set -e
cargo fmt --all -- --check cargo fmt --all -- --check
shopt -s expand_aliases shopt -s expand_aliases
alias check="cargo check --no-default-features" alias check="cargo check --no-default-features"

View File

@ -59,7 +59,7 @@ default = [
"uds", "uds",
] ]
codec = ["tokio-codec"] codec = ["io", "tokio-codec"]
fs = ["tokio-fs"] fs = ["tokio-fs"]
io = ["bytes", "tokio-io"] io = ["bytes", "tokio-io"]
reactor = ["io", "mio", "tokio-reactor"] reactor = ["io", "mio", "tokio-reactor"]

View File

@ -17,11 +17,11 @@ extern crate either;
extern crate futures; extern crate futures;
mod never; mod never;
#[cfg(feature = "util")]
pub mod util;
mod size_hint; mod size_hint;
mod str; mod str;
mod u8; mod u8;
#[cfg(feature = "util")]
pub mod util;
pub use self::size_hint::SizeHint; pub use self::size_hint::SizeHint;
#[doc(inline)] #[doc(inline)]

View File

@ -1,8 +1,8 @@
use BufStream;
use never::Never;
use bytes::{Bytes, BytesMut}; use bytes::{Bytes, BytesMut};
use futures::Poll; use futures::Poll;
use never::Never;
use std::io; use std::io;
use BufStream;
impl BufStream for Vec<u8> { impl BufStream for Vec<u8> {
type Item = io::Cursor<Vec<u8>>; type Item = io::Cursor<Vec<u8>>;