Commit Graph

94 Commits (stabilize-from-stream)

Author SHA1 Message Date
Taiki Endo f0bf66d0df Update futures-preview to 0.3.0-alpha.19 5 years ago
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>
5 years ago
Stjepan Glavina 85b80cfe9a Fuse futures in select! 5 years ago
Stjepan Glavina 17534cfffc Fuse next() future 5 years ago
Stjepan Glavina 0e3c47c3bf Fix imports in docs 5 years ago
Stjepan Glavina 217e435e8e Fix more compilation errors in the book 5 years ago
Stjepan Glavina f2ca3f37a9 Fix build errors in docs 5 years ago
Stjepan Glavina a97d26ca13 Fix imports in the book 5 years ago
Oleksii Kachaiev 55ea367415 Rename server functions to follow *_loop convention (#139)
Rename: server -> accept_loop, client -> connection_loop, client_writer -> connection_writer_loop
5 years ago
Stjepan Glavina 0f4f0fb77e Fix a typo 5 years ago
Stjepan Glavina ab1e2b403a Fix compilation errors on latest nightly 5 years ago
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
5 years ago
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
5 years ago
Aleksey Kladov 5b96fa9daa move a-chat tutorial's code to this repo 5 years ago
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
5 years ago
Yuki Okushi 532c73cf77 Fix typo in stability-guarantees.md (#136) 5 years ago
Florian Gilcher 366546b9ce
Visibly import in tasks example
Fixes #97
5 years ago
Florian Gilcher b768a7bab7
Don't trim msg twice
Fixes #102
5 years ago
Florian Gilcher bfaa9c510c
Import HashMap visibly in the tutorial
Fixes #101
5 years ago
Florian Gilcher 101979fcc3
Fix some final errors 5 years ago
Darin Morrison 6302805b54 Fix book tests
[ci skip]
5 years ago
Darin Morrison 58e783b194 Add empty data.csv for book tests
[ci skip]
5 years ago
Oleksii Kachaiev 34802cae7e [docs] Make sure that "All Together" code compiles (#104)
Added missing `spawn_and_log_error` function declaration
5 years ago
Zach Kemp 6d6328a9c8 use `broker_handle` to avoid overloading the `broker` fn (#100) 5 years ago
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
5 years ago
Stjepan Glavina be616f35bf
Update sending_messages.md 5 years ago
Stjepan Glavina c61f4c8b81
Update receiving_messages.md 5 years ago
Florian Gilcher c9d8b197ca
Add dependencies explanation to book 5 years ago
Yoshua Wuyts 63ad786768
remove async_await feature gate
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Florian Gilcher addda3937f
Merge branch 'master' of github.com:async-std/async-std 5 years ago
Florian Gilcher de036b9cdb
Remove linking sentence linking to itself 5 years ago
Wesley Moore ed81a9e23c
Fix a couple of typos in the book 5 years ago
Florian Gilcher 3b9ee1ad48
Revert "Manual: automated link checking using mdbook-linkcheck (#61)"
This reverts commit fc1774a8ad.
5 years ago
ngirard fc1774a8ad Manual: automated link checking using mdbook-linkcheck (#61)
* travis.yml: add before_script instruction for mdbook and mdbook-linkcheck

* book.toml: add mdbook-linkcheck config options

* Update book.toml
5 years ago
Florian Gilcher 8129da9582
Merge pull request #62 from dcarosone/book-typos-and-small-edits
Book typos and small edits
5 years ago
Florian Gilcher 1fe8a28399
Merge branch 'master' into book-typos-and-small-edits 5 years ago
Florian Gilcher 3e22dc2db2
Merge pull request #59 from ngirard/patch-2
book.toml: some improvements
5 years ago
Florian Gilcher d656882796
Merge pull request #66 from divergentdave/book-copyediting
Copyedits for the book
5 years ago
Florian Gilcher 96b821b9f3
Merge branch 'master' into patch-1 5 years ago
Anthony Dodd f57e3142a1 Small technical correction. (#64)
Absolutely awesome work here! Just reading through the book absorbing all of the awesomeness and noticed this little bit. Let me know if you would like for me to update the corrections in any way.
5 years ago
Shady Khalifa fd0b4d4cff missing .await (#69)
* missing .await

* Update tasks.md
5 years ago
Brad Gibson 7f9dae9e5f
Clarify async fn return type 5 years ago
David Cook 392b6df7c2 Copyedits for the book 5 years ago
Daniel Carosone 9974ff692e markup and typo nits 5 years ago
Daniel Carosone a41b87205d distributed massages are the best 5 years ago
Daniel Carosone 6b23760c4a additional tweaks 5 years ago
Daniel Carosone a4cccb1450 link and more apostrophes 5 years ago
Daniel Carosone 310cda671c use rust code blocks for consistent style 5 years ago
Daniel Carosone ddb11bfb09 more wording tweaks 5 years ago
Daniel Carosone 5d7b641813 bullet character 5 years ago