Skip to content

Commit 822e4bc

Browse files
authored
Merge branch 'master' into fs-stream-repeat-with
2 parents 49d123c + 6e0905d commit 822e4bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+4593
-686
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
1-
on: pull_request
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- staging
8+
- trying
29

310
jobs:
411
build_and_test:
5-
name: Build and test on ${{ matrix.os }}
12+
name: Build and test
613
runs-on: ${{ matrix.os }}
714
strategy:
815
matrix:
916
os: [ubuntu-latest, windows-latest, macOS-latest]
17+
rust: [nightly]
1018

1119
steps:
1220
- uses: actions/checkout@master
1321

14-
- name: Install nightly
22+
- name: Install ${{ matrix.rust }}
1523
uses: actions-rs/toolchain@v1
1624
with:
17-
toolchain: nightly
25+
toolchain: ${{ matrix.rust }}
1826
override: true
1927

2028
- name: check
@@ -41,17 +49,45 @@ jobs:
4149
steps:
4250
- uses: actions/checkout@master
4351

52+
- id: component
53+
uses: actions-rs/components-nightly@v1
54+
with:
55+
component: rustfmt
56+
57+
- uses: actions-rs/toolchain@v1
58+
with:
59+
toolchain: ${{ steps.component.outputs.toolchain }}
60+
override: true
61+
4462
- name: setup
4563
run: |
46-
rustup default nightly
4764
rustup component add rustfmt
4865
test -x $HOME/.cargo/bin/mdbook || ./ci/install-mdbook.sh
4966
rustc --version
67+
5068
- name: mdbook
5169
run: |
5270
mdbook build docs
5371
- name: fmt
5472
run: cargo fmt --all -- --check
5573

5674
- name: Docs
57-
run: cargo doc --features docs,unstable
75+
run: cargo doc --features docs
76+
77+
clippy_check:
78+
name: Clippy check
79+
runs-on: ubuntu-latest
80+
steps:
81+
- uses: actions/checkout@v1
82+
- id: component
83+
uses: actions-rs/components-nightly@v1
84+
with:
85+
component: clippy
86+
- uses: actions-rs/toolchain@v1
87+
with:
88+
toolchain: ${{ steps.component.outputs.toolchain }}
89+
override: true
90+
- run: rustup component add clippy
91+
- uses: actions-rs/clippy-check@v1
92+
with:
93+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/clippy.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,59 @@ and this project adheres to [Semantic Versioning](https://book.async.rs/overview
77

88
## [Unreleased]
99

10+
# [0.99.9] - 2019-10-08
11+
12+
This patch upgrades our `futures-rs` version, allowing us to build on the 1.39
13+
beta. Additionally we've introduced `map` and `for_each` to `Stream`. And we've
14+
added about a dozen new `FromStream` implementations for `std` types, bringing
15+
us up to par with std's `FromIterator` implementations.
16+
17+
And finally we've added a new "unstable" `task::blocking` function which can be
18+
used to convert blocking code into async code using a threadpool. We've been
19+
using this internally for a while now to async-std to power our `fs` and
20+
`net::SocketAddr` implementations. With this patch userland code now finally has
21+
access to this too.
22+
23+
## Example
24+
25+
__Create a stream of tuples, and collect into a hashmap__
26+
```rust
27+
let a = stream::once(1u8);
28+
let b = stream::once(0u8);
29+
30+
let s = a.zip(b);
31+
32+
let map: HashMap<u8, u8> = s.collect().await;
33+
assert_eq!(map.get(&1), Some(&0u8));
34+
```
35+
36+
__Spawn a blocking task on a dedicated threadpool__
37+
```rust
38+
task::blocking(async {
39+
println!("long-running task here");
40+
}).await;
41+
```
42+
43+
## Added
44+
45+
- Added `stream::Stream::map`
46+
- Added `stream::Stream::for_each`
47+
- Added `stream::Stream::try_for_each`
48+
- Added `task::blocking` as "unstable"
49+
- Added `FromStream` for all `std::{option, collections, result, string, sync}` types.
50+
- Added the `path` submodule as "unstable".
51+
52+
## Changed
53+
54+
- Updated `futures-preview` to `0.3.0-alpha.19`, allowing us to build on `rustc 1.39.0-beta`.
55+
- As a consequence of this upgrade, all of our concrete stream implementations
56+
now make use of `Stream::size_hint` to optimize internal allocations.
57+
- We now use GitHub Actions through [actions-rs](https://github.com/actions-rs),
58+
in addition to Travis CI. We intend to fully switch in the near future.
59+
- Fixed a bug introduced in 0.99.6 where Unix Domain Listeners would sometimes become unresponsive.
60+
- Updated our `sync::Barrier` docs to match std.
61+
- Updated our `stream::FromStream` docs to match std's `FromIterator`.
62+
1063
# [0.99.8] - 2019-09-28
1164

1265
## Added
@@ -130,7 +183,8 @@ and this project adheres to [Semantic Versioning](https://book.async.rs/overview
130183

131184
- Initial beta release
132185

133-
[Unreleased]: https://github.com/async-rs/async-std/compare/v0.99.8...HEAD
186+
[Unreleased]: https://github.com/async-rs/async-std/compare/v0.99.9...HEAD
187+
[0.99.9]: https://github.com/async-rs/async-std/compare/v0.99.8...v0.99.9
134188
[0.99.8]: https://github.com/async-rs/async-std/compare/v0.99.7...v0.99.8
135189
[0.99.7]: https://github.com/async-rs/async-std/compare/v0.99.6...v0.99.7
136190
[0.99.6]: https://github.com/async-rs/async-std/compare/v0.99.5...v0.99.6

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "async-std"
3-
version = "0.99.8"
3+
version = "0.99.9"
44
authors = [
55
"Stjepan Glavina <[email protected]>",
66
"Yoshua Wuyts <[email protected]>",
@@ -32,7 +32,7 @@ crossbeam-channel = "0.3.9"
3232
crossbeam-deque = "0.7.1"
3333
futures-core-preview = "=0.3.0-alpha.19"
3434
futures-io-preview = "=0.3.0-alpha.19"
35-
futures-timer = "0.4.0"
35+
futures-timer = "1.0.2"
3636
lazy_static = "1.4.0"
3737
log = { version = "0.4.8", features = ["kv_unstable"] }
3838
memchr = "2.2.1"

0 commit comments

Comments
 (0)