Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: rust
sudo: false
rust:
- nightly-2019-08-12
- nightly-2019-08-21

os:
- linux
Expand All @@ -12,7 +12,7 @@ script:
matrix:
include:
- os: linux
rust: nightly-2019-08-12
rust: nightly-2019-08-21
sudo: required
name: coverage
addons: # needed for `cargo install cargo-travis`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ like `FutureExt::map`, `TryFutureExt::and_then`...

# Requirements

Rust nightly-2019-08-12 for async_await.
Rust nightly-2019-08-21 for async_await.

# State

Expand Down
8 changes: 4 additions & 4 deletions examples/future.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#![feature(async_await)]

use futures_async_combinators::future::*;
use futures::executor;
use futures_async_combinators::future::*;

fn main() {
executor::block_on(async {
let future = ready(Ok::<i32, i32>(1));
let future = and_then(future, |x| ready(Ok::<i32, i32>(x + 3)));
let future = inspect(future, |x| { dbg!(x); });
let future = inspect(future, |x| {
dbg!(x);
});
assert_eq!(future.await, Ok(4));
});
}
6 changes: 2 additions & 4 deletions examples/stream.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#![feature(async_await)]

use futures_async_combinators::stream::*;
use futures::executor;
use futures_async_combinators::stream::*;

fn main() {
let stream = iter(1..=3);
let stream = map(stream, |x| x + 1);
let stream = map(stream, |x| x * 2);

let collect_future = collect(stream);
let collection : Vec<_> = executor::block_on(collect_future);
let collection: Vec<_> = executor::block_on(collect_future);

assert_eq!(vec![4, 6, 8], collection);
}
Loading