Commit Graph

547 Commits (f8af22ff98696059f1fc1984a89637479b63ae7b)
 

Author SHA1 Message Date
Fedor Sakharov efe351659f
Fixes review issues 5 years ago
Stjepan Glavina 0924911ac3 Implement simple work stealing 5 years ago
bors[bot] d73e54450c
Merge #203
203: expose std::pin r=yoshuawuyts a=yoshuawuyts

This is important when defining / calling futures, so it makes sense for us to also export this.

But also given recent user feedback on the confusion on pinning, I'd like to open up the possibility to experiment with providing better pinning facilities  such as [`pin-project`](https://github.com/taiki-e/pin-project) or [`pin_mut`](https://docs.rs/pin-utils/0.1.0-alpha.4/pin_utils/macro.pin_mut.html) behind flags. I'm not sure if we could, or even should. But I want to allow us to have that conversation and test things out (even if it's just in floating patches.)

Thanks!

Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
bors[bot] 265f1ff8eb
Merge #204
204: Add Stream::zip r=stjepang a=tirr-c



Co-authored-by: Wonwoo Choi <chwo9843@gmail.com>
5 years ago
Wonwoo Choi 73db46c90d Add Stream::zip 5 years ago
Yoshua Wuyts 39a1c2b577
add link to std pin docs
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts cafcddb0e1
feature guard pin
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts e9de779863
unstable facade around the pin submodule
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts 7c73cdff25
cargo fmt
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts 343a6c1039
expose std::pin
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
bors[bot] dd92d8dc61
Merge #202
202: Document feature flags in readme r=yoshuawuyts a=yoshuawuyts

Follow up to #190, this documents our feature flags in our readme. Thanks!

Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
Co-authored-by: Yoshua Wuyts <yoshuawuyts+github@gmail.com>
5 years ago
Yoshua Wuyts 8058d637e7
Update README.md
Co-Authored-By: Stjepan Glavina <stjepang@gmail.com>
5 years ago
Yoshua Wuyts 7827410c63
Update README.md 5 years ago
Yoshua Wuyts e6fe8da058
Update README.md
Co-Authored-By: Stjepan Glavina <stjepang@gmail.com>
5 years ago
bors[bot] ee31f68e80
Merge #190 #200
190: Clean up the fs module and a few other places r=stjepang a=stjepang

Just a cleanup for various pieces of documentation, mainly around the `lib.rs` docs, the prelude, and the `fs` module. Some small bugs are also fixed along the way.

This PR is the first one in a series of review PRs that I will be submitting before the upcoming 1.0 release.

200: expose IoSlice, IoSliceMut r=stjepang a=yoshuawuyts

Exposes `io::IoSlice` and `io::IoSliceMut`. Given we're returning these from `read_vectored` and `write_vectored` it might make sense to just include them as part of our re-exports. Thanks!

Ref #131.

Co-authored-by: Stjepan Glavina <stjepang@gmail.com>
Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
bors[bot] 36c437bc09
Merge #199
199: remove custom log code in favor of macro crate r=yoshuawuyts a=yoshuawuyts

This removes our custom log macro code in favor of using [`kv-log-macro`](https://github.com/yoshuawuyts/kv-log-macro). This is a temporary crate that exists only until https://github.com/rust-lang-nursery/log/pull/353 lands which enables progress on https://github.com/rust-lang-nursery/log/issues/328. Thanks!

Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts 1341fa7add
cargo fmt
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts 6e5f29fa58
document feature flags
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts dc664786c9
document feature flags
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts ab112e9f39
expose IoSlice, IoSliceMut
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts 9c82d5e3f3
remove custom log tools in favor of macro crate
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
bors[bot] be123b2ec5
Merge #198
198: Remove Unpin bound in `impl Stream for T` r=stjepang a=tirr-c

I guess this is not needed anymore since we have `poll_next` that receives `Pin` now. The original bound is moved to `Stream::next`.

Co-authored-by: Wonwoo Choi <chwo9843@gmail.com>
5 years ago
Wonwoo Choi b70dfeab15 Require S: async_std::stream::Stream in Scan 5 years ago
Wonwoo Choi d6ffdbce8d Remove Unpin bound in `impl Stream for T` 5 years ago
bors[bot] a4d42e772b
Merge #197
197: Add io::repeat r=stjepang a=tirr-c



Co-authored-by: Wonwoo Choi <chwo9843@gmail.com>
5 years ago
Wonwoo Choi 689b3c6560 Add io::repeat 5 years ago
bors[bot] 03f5022262
Merge #195
195: Remove the Send bound from block_on r=stjepang a=stjepang



Co-authored-by: Stjepan Glavina <stjepang@gmail.com>
5 years ago
bors[bot] f4182caa4a
Merge #196
196: Remove more Unpin bounds for Stream::scan r=stjepang a=tirr-c

cc #192. I missed the bounds on `Stream::scan` itself.

Co-authored-by: Wonwoo Choi <chwo9843@gmail.com>
5 years ago
bors[bot] c6fecbd4ef
Merge #171
171: Add BufRead::consume r=stjepang a=yoshuawuyts

Ref #131. This implements `BufReader::consume`. Thanks!


Note on `fill_buf`: I couldn't get the `async fn fill_buf()` to work, but tracked progress for it here: https://gist.github.com/yoshuawuyts/09bbdc7823225ca96b5e35cd1da5d581. Got some lifetimes isssues. If anyone wants to give this a shot, please do!

Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Wonwoo Choi e7b0fe2d2e Remove Unpin bounds more 5 years ago
bors[bot] 5f7a4433d5
Merge #192
192: Add Stream::scan r=stjepang a=tirr-c

Ref #129. The mapper function `f` is synchronous and returns bare `Option<B>`.

Asynchronous `f` seems tricky to implement right. It requires the wrapper to be self-referential, as a reference to internal state may be captured by the returned future.

Co-authored-by: Wonwoo Choi <chwo9843@gmail.com>
5 years ago
Wonwoo Choi 91e61cf6bf Remove unnecessary Unpin bounds 5 years ago
Stjepan Glavina 1d862cf604 Remove the Send bound from block_on 5 years ago
bors[bot] ff9437d401
Merge #194
194: Add doc comment for JoinHandle drop behavior r=stjepang a=nonnontrivial

fixes #143 

Co-authored-by: Kevin Donahue <nonnontrivial@gmail.com>
5 years ago
Kevin Donahue 127feb47f9 add doc comment for join handle drop behavior 5 years ago
Wonwoo Choi 50a7db2af4 Add Stream::scan 5 years ago
Stjepan Glavina 7f71af9415 cargo fmt 5 years ago
Stjepan Glavina a4381230b8 Clean up the fs module and a few other places 5 years ago
Yoshua Wuyts 3b8e604acc
mark io::cursor as unstable
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts 69c9162558
fix tests
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts a5b0acb378
AsyncBufRead for Cursor
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts 0bc39e6e6c
add io::cursor
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
bors[bot] e060326910
Merge #177
177: implement DoubleEndedStream r=yoshuawuyts a=yoshuawuyts

Ref #129. This is the most basic version of the `DoubleEndedStream` trait. Because there is no counterpart in `futures-rs` we allow this to be implementable (not sure if we should though?).

This is not a high-priority trait to implement, with probably the most useful addition being the blanket impl over [`std::iter::Fuse`](https://doc.rust-lang.org/std/iter/struct.Fuse.html) (where we should have a `Fuse` counterpart for `Stream` also).

So I'm taking this one step at the time, and this PR introduces just the bare minimum to get things working. Thanks!

r? @stjepang @taiki-e

## Refs
- https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html
- #129 


Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts fda74ac0ab
mark as unstable
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts 40fb485cca
cargo fmt
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts 23ca060e4c
implement DoubleEndedStream
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
bors[bot] 3054509fd0
Merge #184
184: housekeeping after 145 r=yoshuawuyts a=montekki

Now that #145 is merged combinators can follow.
1. All combinators taking `&mut self` should imply `Self: Pin`.
2. Trait bounds are to `Stream`
3. Cleans up docs and `Debug` derives.

Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
5 years ago
bors[bot] 4241f64b1b
Merge #189
189: links the timeout docs to each other r=yoshuawuyts a=yoshuawuyts

Was talking in chat about futures timeouts, and apparently folks missed we had two different timeout functions. This links them to each other so if you find one, you also become aware of the other. Thanks!

Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts d68d6bb052
links the timeout docs to each other
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yoshua Wuyts 10fedfe97f
implement feedback for bufreader methods
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago