Commit Graph

201 Commits

Author SHA1 Message Date
John Nunley cdf5d64e6f
v2.3.0
Signed-off-by: John Nunley <dev@notgull.net>
2024-03-17 14:49:37 -07:00
John Nunley 16333c595f
chore: Rename try_stream to drain
At the suggestion of @i509vcb

Signed-off-by: John Nunley <dev@notgull.net>
2024-03-16 09:46:32 -07:00
John Nunley 531c73c3a6
lint: Fix new nightly Clippy lints
Signed-off-by: John Nunley <dev@notgull.net>
2024-02-25 17:58:43 -08:00
John Nunley d4230bd104
Add a Stream::try_stream() method (#70)
* Add a Stream::try_stream() method
* Mention non-fuse status in docs.
* Add accessor methods for inner stream.

Signed-off-by: John Nunley <dev@notgull.net>
Signed-off-by: Alain Zscheile <fogti+devel@ytrizja.de>
2024-02-18 21:54:16 +01:00
Taiki Endo 2e555681d5 Release 2.2.0 2024-01-07 05:41:52 +09:00
Taiki Endo 7edb0e597f Fix clippy::redundant_guards warning
```
warning: redundant guard
    --> src/io.rs:2701:28
     |
2701 |                 Ok(buf) if buf.is_empty() => {
     |                            ^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
     = note: `#[warn(clippy::redundant_guards)]` on by default
help: try
     |
2701 -                 Ok(buf) if buf.is_empty() => {
2701 +                 Ok([]) => {
     |
```
2024-01-07 04:57:11 +09:00
Taiki Endo d6f2a9bd32 Migrate to Rust 2021 2024-01-07 04:52:17 +09:00
Taiki Endo e6be4ddba6 Relax MSRV to 1.60
Since https://github.com/smol-rs/futures-lite/pull/77, this crate works
on 1.60.
2024-01-07 04:52:17 +09:00
Taiki Endo 51908bd069 ci: Use cargo-hack's --rust-version flag for msrv check
This respects rust-version field in Cargo.toml, so it removes the need
to manage MSRV in both the CI file and Cargo.toml.
2024-01-07 04:52:17 +09:00
John Nunley abb80b96b5
feat: Implement size_hint for stream::Filter
Signed-off-by: John Nunley <dev@notgull.net>
2024-01-03 19:17:07 -08:00
John Nunley 3b14c82b11
feat: Relax Unpin bounds on io::copy
This commit makes it so `!Unpin` types can be passed into `io::copy`.

Signed-off-by: John Nunley <dev@notgull.net>
2024-01-03 18:36:33 -08:00
John Nunley 85a3f0f85a
v2.1.0
Signed-off-by: John Nunley <dev@notgull.net>
2023-12-02 11:01:01 -08:00
John Nunley e94a46be67
feat: Move memchr behind an optional feature
Closes #76

Signed-off-by: John Nunley <dev@notgull.net>
2023-11-14 20:28:35 -08:00
John Nunley 7dbe2945e1
v2.0.1
Signed-off-by: John Nunley <dev@notgull.net>
2023-11-05 17:21:41 -08:00
Taiki Endo d994f5452a
m: Remove dependency on waker-fn 2023-10-25 17:55:19 -07:00
John Nunley c8551a334c
v2.0.0
Signed-off-by: John Nunley <dev@notgull.net>
2023-10-25 08:38:13 -07:00
Taiki Endo 32cc46671c Update actions/checkout action to v4 2023-09-10 18:27:30 +09:00
John Nunley 2234456b71
Merge pull request #75 from smol-rs/notgull/efficient-rng
Add a way to provide your own seed to racey futures
2023-09-03 08:18:13 -07:00
John Nunley b85ecf540f Bump MSRV to 1.61
This prevents memchr compile errors for now.

Signed-off-by: John Nunley <dev@notgull.net>
2023-09-03 08:14:57 -07:00
John Nunley ee3d5806f0 Add racey functions for using your own RNG seed
The race functions were not available on no_std targets. This commit
adds "with_seed" variants that take a u64 seed that is passed to
fastrand. It can be used on no_std targets to provide random racey
futures and streams.

A "race" feature is added that enables it. This way fastrand doesn't
become a dependency for crates that don't need it, like async-io.

Signed-off-by: John Nunley <dev@notgull.net>
2023-09-03 08:14:35 -07:00
John Nunley 074c0cadf4
Make racey futures use an internal RNG
This commit prevents these functions from needed to make calls into
thread-local storage for every poll.

Signed-off-by: John Nunley <dev@notgull.net>
2023-08-23 21:09:58 -07:00
Alain Zscheile 7896fcce52 API BREAK: make zip/try_zip implementation cleaner 2023-08-23 17:23:12 +02:00
Alain Zscheile ef3fcc552a Reduce code duplication in future::block_on 2023-08-23 17:23:12 +02:00
John Nunley e19ced4582
breaking: Import ready and pending from libstd
Signed-off-by: John Nunley <dev@notgull.net>
2023-08-17 07:51:36 -07:00
John Nunley d6a3bdc83c
Add smol-rs logo (#72) 2023-07-17 14:35:19 +09:00
dependabot[bot] 348e0264c0 Update fastrand requirement from 1.3.4 to 2.0.0
Updates the requirements on [fastrand](https://github.com/smol-rs/fastrand) to permit the latest version.
- [Release notes](https://github.com/smol-rs/fastrand/releases)
- [Changelog](https://github.com/smol-rs/fastrand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smol-rs/fastrand/compare/v1.3.4...v2.0.0)

---
updated-dependencies:
- dependency-name: fastrand
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-11 16:04:12 +09:00
Taiki Endo a31ec7c82b Minimize GITHUB_TOKEN permissions
Refs: https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token
2023-06-09 00:16:44 +09:00
Taiki Endo d5a8775dc0 Set CARGO_NET_GIT_FETCH_WITH_CLI=true in CI 2023-04-10 02:38:08 +09:00
John Nunley b6db659e11
v1.13.0 (#69)
- Unbind Debug implementations of BufReader and BufWriter. (#49)
- Add the once_future() combinator. (#59)
- Add a combinator for temporarily using an AsyncRead/AsyncWrite as Read/Write. (#62)
- Implement more methods for stream::BlockOn. (#68)
2023-04-07 12:28:12 -07:00
John Nunley 3ec5c052b0
Implement for methods for stream::BlockOn (#68) 2023-02-13 19:15:13 -08:00
Taiki Endo c8066a86f2 Enable dependabot update for Rust 2022-12-28 12:23:52 +09:00
Taiki Endo a6557ed6ec Clean up CI config 2022-12-28 12:23:52 +09:00
Taiki Endo bd42a2a740 Remove msrv field from .clippy.toml
Since Rust 1.64, Clippy respects `rust-version` field in Cargo.toml.
rust-lang/rust@b776fb8
2022-12-28 12:23:52 +09:00
John Nunley a0871ebe49
Add a combinator for temporarily using an AsyncRead/AsyncWrite as Read/Write (#62)
Add AsyncAsSync wrapper

Co-authored-by: Alain Zscheile <zseri.devel@ytrizja.de>
2022-11-07 09:26:02 +01:00
Alain Zscheile 4c03e0d600
Merge pull request #64 from smol-rs/assert-async-refac
factor loop-match pattern out of AssertAsync method impls
2022-11-07 01:50:20 +01:00
Alain Zscheile d21bfc5e9d factor loop-match pattern out of AssertAsync method impls 2022-11-07 00:26:11 +01:00
John Nunley 723ae31f00
Add the into_stream() combinator (#59)
* Add the into_stream combinator

* fix pinning in examples

* Remove trait method

* Rename to stream::once_future

* Forgot to commit changes from future.rs

* remove unused import
2022-11-06 15:11:09 -08:00
Alain Zscheile 6c339df9e6
Merge pull request #63 from notgull/clippy
Fix clippy error
2022-11-06 23:29:32 +01:00
jtnunley fe8f3c357c Fix clippy error 2022-11-06 08:38:37 -08:00
Taiki Endo a28ac5b24f Revert "Always set #![no_std]"
This reverts commit 4a53c9b238.

This caused a build error on Rust 1.40.

```
error[E0433]: failed to resolve: could not find `poll_with_tls_context` in `future`

error[E0433]: failed to resolve: could not find `from_generator` in `future`

error: aborting due to 2 previous errors
```
2022-09-01 22:46:05 +09:00
Taiki Endo 39132f200a Use doc(no_inline) on top-level trait reexports
Refs: https://github.com/rust-lang/futures-rs/issues/2472
2022-09-01 22:39:04 +09:00
Taiki Endo 4a53c9b238 Always set #![no_std] 2022-09-01 22:36:24 +09:00
Taiki Endo d8011b30ef
Merge pull request #56 from d2weber/patch-1
Fix copy/paste errors in docs
2022-07-24 20:12:22 +09:00
d2weber acc023530d
Fix copy/paste errors in docs 2022-07-24 13:06:34 +02:00
Taiki Endo f1e449bca7 Apply clippy to all targets 2022-07-17 21:21:58 +09:00
Taiki Endo 9d6a1c1632 Update CI config 2022-07-08 02:44:20 +09:00
Taiki Endo 638c76831a Update actions/checkout action to v3 2022-05-01 14:39:38 +09:00
Taiki Endo 1e17669c65 Ignore clippy::needless_borrow lint 2022-04-17 20:00:26 +09:00
Taiki Endo cb61e39270 Create GitHub release automatically 2022-01-08 23:50:22 +09:00
Taiki Endo 87284a93f6 Clean up CI config 2022-01-08 23:50:00 +09:00