2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-04-19 06:46:45 +00:00
Commit graph

32 commits

Author SHA1 Message Date
Sheyne Anderson
1a51ca424a Fix typo in tutorial in book (#412) 2019-11-01 20:17:46 +01:00
Taiki Endo
f0bf66d0df Update futures-preview to 0.3.0-alpha.19 2019-09-29 00:38:49 +09:00
bors[bot]
33ff41df48
Merge #224
224: Re-export IO traits from futures r=stjepang a=stjepang

Sorry for the big PR!

Instead of providing our own traits `async_std::io::{Read, Write, Seek, BufRead}`, we now re-export `futures::io::{AsyncRead, AsyncWrite, AsyncSeek, AsyncRead}`. While re-exporting we rename them to strip away the "Async" prefix.

The documentation will display the contents of the original traits from the `futures` crate together with our own extension methods. There's a note in the docs saying the extenion methods become available only when `async_std::prelude::*` is imported.

Our extension traits are re-exported into the prelude, but are marked with `#[doc(hidden)]` so they're completely invisible to users.

The benefit of this is that people can now implement traits from `async_std::io` for their types and stay compatible with `futures`. This will also simplify some trait bounds in our APIs - for example, things like `where Self: futures_io::AsyncRead`.

At the same time, I cleaned up some trait bounds in our stream interfaces, but haven't otherwise fiddled with them much.

I intend to follow up with another PR doing the same change for `Stream` so that we re-export the stream trait from `futures`.

Co-authored-by: Stjepan Glavina <stjepang@gmail.com>
2019-09-22 13:50:53 +00:00
Stjepan Glavina
85b80cfe9a Fuse futures in select! 2019-09-22 15:35:53 +02:00
Stjepan Glavina
17534cfffc Fuse next() future 2019-09-22 15:19:54 +02:00
Stjepan Glavina
0e3c47c3bf Fix imports in docs 2019-09-22 12:41:04 +02:00
Stjepan Glavina
217e435e8e Fix more compilation errors in the book 2019-09-22 12:03:56 +02:00
Oleksii Kachaiev
55ea367415 Rename server functions to follow *_loop convention (#139)
Rename: server -> accept_loop, client -> connection_loop, client_writer -> connection_writer_loop
2019-09-20 09:54:48 +03:00
Stjepan Glavina
0f4f0fb77e Fix a typo 2019-09-11 17:29:33 +02:00
Stjepan Glavina
ab1e2b403a Fix compilation errors on latest nightly 2019-09-11 17:17:20 +02:00
James Munns
a8090be3eb Fix book to use futures_channel and futures_util, re-enable testing (#172)
* Fix book to use futures_channel and futures_util, re-enable testing

* Make dev dependencies for the book explicit
2019-09-10 12:54:06 +02:00
Stjepan Glavina
bac74c2d7f
Reduce dependency on futures crate (#140)
* Add future::poll_fn

* Replace all uses of poll_fn with the new one

* Remove some uses of futures

* Simplify ReadDir and DirEntry

* Remove some use of futures from File

* Use futures subcrates

* Fix imports in docs

* Remove futures-util dependency

* Remove futures-executor-preview

* Refactor

* Require more features in the futures-preview crate
2019-09-05 01:22:41 +02:00
Aleksey Kladov
5b96fa9daa move a-chat tutorial's code to this repo 2019-09-04 21:25:54 +03:00
DCjanus
238a3c882b Implement an async version of ToSocketAddrs (#74)
* Implement an async version of ToSocketAddrs

* fix documentation issue

* genius hack: pretending to be `impl Future`

* replace `std::net::ToSocketAddrs` with `async-std::net::ToSocketAddrs`

* Move unit tests into the tests directory

* Stylistic changes

* Remove re-exports in async_std::net

* fix broken link

* some mirror changes

* remove unnecessary format

* migrate: `std::net::ToSocketAddrs` -> `async_std::net::ToSocketAddrs`

* fix typo(tutorial)

* remove unnecessary type bound

* lifetime for future
2019-09-04 20:09:49 +02:00
Florian Gilcher
b768a7bab7
Don't trim msg twice
Fixes #102
2019-08-26 14:35:57 -07:00
Florian Gilcher
bfaa9c510c
Import HashMap visibly in the tutorial
Fixes #101
2019-08-26 14:33:11 -07:00
Florian Gilcher
101979fcc3
Fix some final errors 2019-08-26 14:24:20 -07:00
Darin Morrison
6302805b54 Fix book tests
[ci skip]
2019-08-25 04:34:41 -07:00
Oleksii Kachaiev
34802cae7e [docs] Make sure that "All Together" code compiles (#104)
Added missing `spawn_and_log_error` function declaration
2019-08-23 17:17:12 -07:00
Zach Kemp
6d6328a9c8 use broker_handle to avoid overloading the broker fn (#100) 2019-08-23 17:16:17 -07:00
Rui Loura
794c12fe7e Fix some typos in tutorial (#98)
* fix typo in tutorial

* add async_std::io::BufReader to tutorial code

* writers in clean_shutdown.md return unit type
2019-08-23 06:37:54 -07:00
Stjepan Glavina
be616f35bf
Update sending_messages.md 2019-08-22 23:56:13 +02:00
Stjepan Glavina
c61f4c8b81
Update receiving_messages.md 2019-08-22 23:17:52 +02:00
Florian Gilcher
c9d8b197ca
Add dependencies explanation to book 2019-08-22 07:53:32 -07:00
Yoshua Wuyts
63ad786768
remove async_await feature gate
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-08-21 00:29:35 -07:00
Florian Gilcher
1fe8a28399
Merge branch 'master' into book-typos-and-small-edits 2019-08-18 11:34:26 +02:00
David Cook
392b6df7c2 Copyedits for the book 2019-08-17 00:41:37 -05:00
Daniel Carosone
9974ff692e markup and typo nits 2019-08-17 11:58:35 +10:00
Daniel Carosone
a41b87205d distributed massages are the best 2019-08-17 11:50:59 +10:00
skorgu
9e89e79113
Remove errant backticks 2019-08-16 16:48:34 -04:00
Florian Gilcher
9b583b358a
Book fixes 2019-08-16 20:04:14 +02:00
Florian Gilcher
d3c67148b7
Seperate the tutorial in multiple parts
Fix some typos
2019-08-15 15:20:29 +02:00