Skip to content

Commit 2f09077

Browse files
authored
Merge pull request #617 from async-rs/1.3.0
1.3.0
2 parents 96d6fc4 + 055c64e commit 2f09077

File tree

2 files changed

+53
-2
lines changed

2 files changed

+53
-2
lines changed

CHANGELOG.md

+52-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,56 @@ and this project adheres to [Semantic Versioning](https://book.async.rs/overview
77

88
## [Unreleased]
99

10+
# [1.3.0] - 2019-12-12
11+
12+
[API Documentation](https://docs.rs/async-std/1.3.0/async-std)
13+
14+
This patch introduces `Stream::delay`, more methods on `DoubleEndedStream`,
15+
and improves compile times. `Stream::delay` is a new API that's similar to
16+
[`task::sleep`](https://docs.rs/async-std/1.2.0/async_std/task/fn.sleep.html),
17+
but can be passed as part of as stream, rather than as a separate block. This is
18+
useful for examples, or when manually debugging race conditions.
19+
20+
## Examples
21+
22+
```rust
23+
let start = Instant::now();
24+
let mut s = stream::from_iter(vec![0u8, 1]).delay(Duration::from_millis(200));
25+
26+
// The first time will take more than 200ms due to delay.
27+
s.next().await;
28+
assert!(start.elapsed().as_millis() >= 200);
29+
30+
// There will be no delay after the first time.
31+
s.next().await;
32+
assert!(start.elapsed().as_millis() <= 210);
33+
```
34+
35+
## Added
36+
37+
- Added `Stream::delay` as "unstable" [(#309)](https://github.com/async-rs/async-std/pull/309)
38+
- Added `DoubleEndedStream::next_back` as "unstable" [(#562)](https://github.com/async-rs/async-std/pull/562)
39+
- Added `DoubleEndedStream::nth_back` as "unstable" [(#562)](https://github.com/async-rs/async-std/pull/562)
40+
- Added `DoubleEndedStream::rfind` as "unstable" [(#562)](https://github.com/async-rs/async-std/pull/562)
41+
- Added `DoubleEndedStream::rfold` as "unstable" [(#562)](https://github.com/async-rs/async-std/pull/562)
42+
- Added `DoubleEndedStream::try_rfold` as "unstable" [(#562)](https://github.com/async-rs/async-std/pull/562)
43+
- `stream::Once` now implements `DoubleEndedStream` [(#562)](https://github.com/async-rs/async-std/pull/562)
44+
- `stream::FromIter` now implements `DoubleEndedStream` [(#562)](https://github.com/async-rs/async-std/pull/562)
45+
46+
## Changed
47+
48+
- Removed our dependency on `async-macros`, speeding up compilation [(#610)](https://github.com/async-rs/async-std/pull/610)
49+
50+
## Fixes
51+
52+
- Fixed a link in the task docs [(#598)](https://github.com/async-rs/async-std/pull/598)
53+
- Fixed the `UdpSocket::recv` example [(#603)](https://github.com/async-rs/async-std/pull/603)
54+
- Fixed a link to `task::block_on` [(#608)](https://github.com/async-rs/async-std/pull/608)
55+
- Fixed an incorrect API mention in `task::Builder` [(#612)](https://github.com/async-rs/async-std/pull/612)
56+
- Fixed leftover mentions of `futures-preview` [(#595)](https://github.com/async-rs/async-std/pull/595)
57+
- Fixed a typo in the tutorial [(#614)](https://github.com/async-rs/async-std/pull/614)
58+
- `<TcpStream as Write>::poll_close` now closes the write half of the stream [(#618)](https://github.com/async-rs/async-std/pull/618)
59+
1060
# [1.2.0] - 2019-11-27
1161

1262
[API Documentation](https://docs.rs/async-std/1.2.0/async-std)
@@ -553,7 +603,8 @@ task::blocking(async {
553603

554604
- Initial beta release
555605

556-
[Unreleased]: https://github.com/async-rs/async-std/compare/v1.2.0...HEAD
606+
[Unreleased]: https://github.com/async-rs/async-std/compare/v1.3.0...HEAD
607+
[1.3.0]: https://github.com/async-rs/async-std/compare/v1.2.0...v1.3.0
557608
[1.2.0]: https://github.com/async-rs/async-std/compare/v1.1.0...v1.2.0
558609
[1.1.0]: https://github.com/async-rs/async-std/compare/v1.0.1...v1.1.0
559610
[1.0.1]: https://github.com/async-rs/async-std/compare/v1.0.0...v1.0.1

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "async-std"
3-
version = "1.2.0"
3+
version = "1.3.0"
44
authors = [
55
"Stjepan Glavina <[email protected]>",
66
"Yoshua Wuyts <[email protected]>",

0 commit comments

Comments
 (0)