2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-04-07 08:56:41 +00:00
Commit graph

51 commits

Author SHA1 Message Date
Nicholas Nethercote
1146c66f1b Remove extension_trait.
At this point, `extension_trait` is basically an expensive no-op. This
commit removes it. The next commit will adjust the indentation.
2022-03-11 13:14:40 +11:00
Nicholas Nethercote
2dde8820fa Remove what's left of the first trait in extension_trait. 2022-03-11 13:14:03 +11:00
Nicholas Nethercote
1c70420c5a Move the base trait re-export outside of extension_trait. 2022-03-11 13:12:56 +11:00
Nicholas Nethercote
c626a69670 Move the blanket impl outside of extension_trait. 2022-03-11 13:12:08 +11:00
Nicholas Nethercote
6b3667d1a4 Remove unnecessary types in extension_trait.
The remaining type requires the square brackets (for now) because a `ty`
cannot immediately precede a `$(tt)*`.
2022-03-11 13:10:28 +11:00
Nicholas Nethercote
c10d2d3a6f Simplify the first trait in extension_trait.
The body and doc comment are no longer used.
2022-03-11 13:09:30 +11:00
Nicholas Nethercote
ed2fcce557 Remove docs-only features from extension_trait.
This is the `@doc` rules, the shim trait impls, and the imports.
2022-03-11 12:46:59 +11:00
Nicholas Nethercote
f56a8d6935 Remove unused borrowed module. 2022-03-11 10:09:01 +11:00
Nicholas Nethercote
e19ab626a1 Remove unused parameter from extension_trait! rules.
Two of the rules have `(+ $lt:lifetime)?` that is not used on the RHS
and serves no useful purpose. This commit removes it.
2022-03-11 09:31:01 +11:00
Nicholas Nethercote
db7c1946c8 Move the extension_trait! accumulator to the end of the rules.
That way, when the `-> impl Future` rules fail (which is most of the
time), the cost of reparsing the accumulated tokens is avoided.
2022-03-10 17:10:12 +11:00
Nicholas Nethercote
21fb4ac0fb Remove two useless rules from extension_trait!.
They never run because they are subsumed by the two rules immediately
above.
2022-03-10 17:09:33 +11:00
Friedel Ziegelmayer
e9cb238f49
fix wasm and nostd builds
Co-authored-by: Jacob Rothstein <hi@jbr.me>
2020-09-14 21:31:19 +02:00
Marc-Antoine Perennou
e2f638496c don't init runtime threadpool unless necessary
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2020-08-31 21:43:21 +02:00
Marc-Antoine Perennou
e4fb4b6128 update smol dependencies
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2020-08-27 09:23:00 +02:00
Marc-Antoine Perennou
25e0e1abdc switch to async-io
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2020-07-24 23:02:10 +02:00
Marc-Antoine Perennou
8886039ac5 fix build with -default +unstable
and add a CI check for it

Fixes #842

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2020-07-24 23:01:51 +02:00
dignifiedquire
06a2fb8c4f fix export 2020-06-18 13:10:37 +02:00
dignifiedquire
1c1c168e1b fix(timer): ensure the runtime is working for timers 2020-06-18 12:37:14 +02:00
dignifiedquire
8389041414 fix 2020-06-03 18:50:12 +02:00
dignifiedquire
8943ba82dd fix nostd 2020-06-03 18:43:19 +02:00
dignifiedquire
52c72426c1 fix: do not require the runtime to use unstable features 2020-06-03 18:38:20 +02:00
Azriel Hoh
d3e59370e7 Switches wasm-timer for futures-timer. 2020-05-13 10:14:05 +12:00
dignifiedquire
48dd683535 fix feature settings 2020-05-02 20:27:50 +02:00
dignifiedquire
e4df1405c1 feat: add basic wasm support 2020-05-02 20:27:50 +02:00
dignifiedquire
75ab7219df bring back random 2020-05-02 20:27:50 +02:00
dignifiedquire
1308fbdf55 switch to smol instead of an internal runtime 2020-05-02 20:27:50 +02:00
k-nasa
8931d1464e fix ci 2020-03-14 22:46:22 +09:00
nasa
cc19592f80
Revert "Stabilize most stream method and remove unnecessary macros" 2020-03-12 18:34:09 +09:00
k-nasa
1e18839f1f fix warning 2020-03-04 08:55:37 +09:00
k-nasa
f31878655e fix: Stabilize stream method 2020-03-04 08:30:45 +09:00
k-nasa
0d90cb07b9 fix: Move extern crate alloc to lib.rs 2020-02-01 09:49:54 +09:00
k-nasa
7efe7caf66 fix: Change feature name no-std to alloc 2020-01-28 15:58:46 +09:00
k-nasa
3d32fd81f4 feat: Make the utils module no_std 2020-01-28 15:58:46 +09:00
dignifiedquire
9c6ab5e7c3 fix 2020-01-11 11:57:42 +01:00
dignifiedquire
9c9ab90da3 feature gate random 2020-01-11 11:49:52 +01:00
dignifiedquire
5bf3d95313 feat: do not require default feature for unstable 2020-01-11 11:44:51 +01:00
Yoshua Wuyts
3f8ec5a007
Merge pull request #551 from killercup/feature/verbose-errors
verbose errors feature
2019-11-20 12:22:58 +01:00
Pascal Hertleif
c704643296 Remove verbose-errors cargo feature 2019-11-19 13:15:48 +01:00
Stjepan Glavina
d3e7f32a30 Macro optimization to reduce compilation times 2019-11-18 15:47:45 +00:00
Pascal Hertleif
99ddfb3f93 Wrap code more clearly in cfg blocks 2019-11-17 23:11:11 +01:00
Pascal Hertleif
8ce3e78952 verbose errors feature
This adds a new "verbose-errors" feature flag to async-std that enables
wrapping certain errors in structures with more context. As an example,
we use it in `fs::File::{open,create}` to add the given path to the
error message (something that is lacking in std to annoyance of many).
2019-11-17 21:54:44 +01:00
Yoshua Wuyts
335bd34470 Add "std" feature flag (#476)
* core feature

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>

* introduce std + default features

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>

* test std features on ci

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>

* finish up all features

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>

* Fix task_local macro

* Remove crossbeam-channel and futures-timer from std

* Move future::timeout() behind cfg_default
2019-11-07 23:56:58 +00:00
Stjepan Glavina
f588ba6bdd
Spawn more than one blocking thread (#475)
* Spawn more than 1 blocking thread

* Fix a bug

* Fix check when the thread is last sleeping
2019-11-07 23:39:54 +00:00
Stjepan Glavina
a757cc02dc Expose extension traits in preludes 2019-11-06 00:21:32 +01:00
Yoshua Wuyts
735fa6954e Replace select!/try_select! with Future::{race,try_race} (#405)
* init Future::select

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>

* implement Future::select

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>

* try_select

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>

* fixes

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>

* works

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>

* pass clippy

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>

* please clippy

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>

* implement feedback from stjepan

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>

* rename select to race

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>

* fmt

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-11-02 23:00:03 +01:00
Stjepan Glavina
3dd59d7056
Refactor the task module (#421)
* Refactor the task module

* Fix clippy warning

* Simplify task-local entries

* Reduce the amount of future wrapping

* Cleanup

* Simplify stealing
2019-11-01 02:45:33 +01:00
Stjepan Glavina
ec23632f3e
Cleanup: replace cfg-if with our macros (#361)
* Cleanup: replace cfg-if with our macros

* Prefix macros with cfg_

* Remove #[macro_export] from internal macros
2019-10-17 19:17:49 +02:00
Yoshua Wuyts
49faea2023 init FutureExt (#308)
* init FutureExt

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>

* prelude

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>

* Refactor extension_trait

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>

* Fix rustdoc

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-10-15 16:27:06 +02:00
Stjepan Glavina
ff028bb540 Improve compile times and add comments 2019-09-26 14:21:27 -04:00
Stjepan Glavina
79eab9eb9a Simplify extension traits using a macro 2019-09-26 07:46:29 -04:00