1
Fork 0

Support cargo test with all toolchains.

This commit is contained in:
Alex Helfet 2017-12-24 20:00:29 +00:00
parent 68428fbd84
commit 5b55fd3db8
3 changed files with 10 additions and 26 deletions

View file

@ -3,18 +3,10 @@ set -ex
# A simple build script to run locally.
rustup toolchain update stable;
rustup toolchain update beta;
rustup toolchain update nightly;
cargo +stable build --verbose;
cargo +stable build --verbose --no-default-features;
cargo +beta build --verbose;
cargo +beta build --verbose --no-default-features;
cargo +nightly test --verbose;
cargo +nightly test --verbose --no-default-features;
cargo +stable doc --verbose;
cargo +beta doc --verbose;
cargo +nightly doc --verbose;
for tc in stable beta nightly; do
echo "Toolchain: ${tc}";
rustup toolchain update ${tc};
cargo +${tc} test --verbose;
cargo +${tc} test --verbose --no-default-features;
cargo +${tc} doc --verbose;
done

View file

@ -4,12 +4,6 @@ set -e
echo "TRAVIS_RUST_VERSION: '${TRAVIS_RUST_VERSION}'"
set -x
cargo build --verbose;
cargo build --verbose --no-default-features;
if [[ "${TRAVIS_RUST_VERSION}" == "nightly" ]]; then
cargo test --verbose;
cargo test --verbose --no-default-features;
fi
cargo doc --verbose;

View file

@ -80,8 +80,6 @@
//! instance.
#![deny(warnings)]
#![cfg_attr(test, feature(conservative_impl_trait))]
#![cfg_attr(not(feature = "use_std"), no_std)]
extern crate cobs;
@ -508,10 +506,10 @@ mod rw_tests {
}
}
fn pair() -> (Sender<impl Write>, Receiver<impl Read>) {
fn pair() -> (Sender<Box<Write>>, Receiver<Box<Read>>) {
let c = Channel::new();
let tx = Sender::new(c.writer());
let rx = Receiver::new(c.reader());
let tx = Sender::new(Box::new(c.writer()) as Box<Write>);
let rx = Receiver::new(Box::new(c.reader()) as Box<Read>);
(tx, rx)
}
}