Skip to content

Commit

Permalink
Run tests with nightly compiler (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
sagebind authored Jul 15, 2019
1 parent 6349cff commit 65cc50b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .github/main.workflow
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
workflow "Main" {
workflow "build" {
on = "push"
resolves = ["Test"]
resolves = ["test-nightly"]
}

action "Test" {
uses = "docker://rust"
args = "cargo test"
action "test-nightly" {
uses = "docker://rustlang/rust:nightly"
args = "cargo test --features nightly"
}
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ keywords = ["buffer", "pipe", "channel"]
categories = ["asynchronous", "concurrency", "data-structures"]
license = "MIT"

[features]
nightly = []

[dependencies]
futures-preview = "0.3.0-alpha.16"
futures-preview = "0.3.0-alpha.17"

[dev-dependencies]
criterion = "0.2"
Expand Down
1 change: 1 addition & 0 deletions benches/pipe.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg(feature = "nightly")]
#![feature(async_await)]

use criterion::*;
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
//!
//! See the `pipe` module for details.
#![cfg_attr(test, feature(async_await))]
#![cfg_attr(feature = "nightly", feature(async_await))]

pub mod pipe;
5 changes: 2 additions & 3 deletions src/pipe/chunked.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
//! Because of these constraints, instead we use a quite unique type of buffer
//! that uses a fixed number of growable buffers that are exchanged back and
//! forth between a producer and a consumer. Since each buffer is a vector, it
//! can grow to whatever size is required of it in order to fit a single curl
//! chunk.
//! can grow to whatever size is required of it in order to fit a single chunk.
//!
//! To avoid the constant allocation overhead of creating a new buffer for every
//! chunk, after a consumer finishes reading from a buffer, it returns the
Expand Down Expand Up @@ -188,7 +187,7 @@ impl AsyncWrite for Writer {
}
}

#[cfg(test)]
#[cfg(all(test, feature = "nightly"))]
mod tests {
use futures::executor::block_on;
use super::*;
Expand Down

0 comments on commit 65cc50b

Please sign in to comment.