Commit Graph

126 Commits (fa29b508e138ee0c91873039bc28cb71a4546460)

Author SHA1 Message Date
Rajas Paranjpe 2e8c579218
Fix typo: at a time instead of at time 1 year ago
Kian-Meng Ang fc69db1703 Fix typos 3 years ago
Josh Triplett 4534db57eb
Merge pull request #1024 from joshtriplett/remove-pre-std-future-docs
futures now re-exports std Future; remove docs about differences
3 years ago
Josh Triplett ca8305064b Switch branch name to `main`
Update all references.
3 years ago
Josh Triplett 6f2b6d3340 futures now re-exports std Future; remove docs about differences 3 years ago
kokihonda dd2749ca35 Remove the numbering of the remaining previous chapters 3 years ago
surechen 9c031375c8
docs: add description for fuse() in handling_disconnection
Ref #88
3 years ago
Max Davitt a410082a7f
Fix typo in Tasks book page 4 years ago
Micaël Bergeron 7eaf577b78
Fix a typo for [sic] FuturesExt trait
The trait that is being referred to here is called `futures::future::FutureExt`.
4 years ago
Akshat Agarwal efaeadce88
(typo) s/panicing/panicking 4 years ago
Ryan Brainard 50e7cf0e43 Pass in error to log line with placeholder 4 years ago
Ryan Brainard c5631996c9 Match on result (input) not stream (output) 4 years ago
abhi 4742f461fe
Add missing ? operator after handle.await
According to line#118, there should be a `?` operator after `await`.
5 years ago
ninj b258215952
fix syntax problem for task::sleep 5 years ago
Florian Gilcher 1ababac97f
Merge branch 'accept_loop_pattern' 5 years ago
Florian Gilcher f9fe5c90cf
Fix some typos in accept-loop pattern chapter 5 years ago
Florian Gilcher cad2880eb8
Merge pull request #550 from sclaire-1/master
Edit tutorial: implementing_a_client.md
5 years ago
Paul Colomiets 0029037883 async-listen crate: Add `error_hint()` invocation 5 years ago
Paul Colomiets c8c075615c book: Add Production-ready Accept Loop section
Part of the #658 work
5 years ago
svengrim 447c17128f
fix: Fix typo in documentation 5 years ago
linkmauve 55560ea9b4
docs: Replace mention of futures-preview crate
It is now stable in 0.3.
5 years ago
Alejandro Martinez Ruiz ba1ee2d204 Fix a-chat tutorial issues (#573)
* tutorial/receiving_messages: fix future output type bound

* tutorial/receiving_messages: remove unneeded message trimming

Trimming was done twice on messages, so one of the two instances can
be removed. I personally think removing the first instance, in which
we are splitting names from messages makes the code more readable
than removing the second instance, but other examples further in
the tutorial show the second instance removed.

* tutorial/receiving_messages: declare use of TcpStream and io::BufReader

Readers couldn't see the `use` lines corresponding to these two
structures.

* tutorial/connecting_readers_and_writers: typos and grammar fixes

* tutorial/all_together: remove unneeded use async_std::io

* tutorial: use SinkExt consistently from futures::sink::SinkExt

* tutorial/handling_disconnection: hide mpsc use clause and remove empty lines

The empty lines translate to the output making it look weird.

* tutorial/handling_disconnection: fix typos

* tutorial/handling_disconnection: use ? in broker_handle.await

We were happy to return an Err variant from the broker_handle before
and nothing has changed in this regard, so bubbling it up to run().
5 years ago
sclaire-1 b2aaa8b825
Edit tutorial: implementing_a_client.md
Edited to improve reading flow
5 years ago
yjhmelody 76ec9c4563 update doc url 5 years ago
sclaire-1 8473b738d0
Edit tutorial index.md
Edited the structure of sentences to make it easier to read
5 years ago
Florian Gilcher 6f4bea07a1
Update version requirements in the tutorial 5 years ago
CosciaDiPollo 9ad0cf9f80 Correct a typo on the async-std version (#508)
Correct a typo on the async-std version in the Cargo.toml file of the documentation.
5 years ago
Yoshua Wuyts 4aa9928ece
v1.0.0
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Stjepan Glavina c34e0f8a35
Update futures to 0.3 (#463)
* Update futures to 0.3

* Fix a search-and-replace error

* Fix imports in tests

* Fix an import
5 years ago
Sheyne Anderson 1a51ca424a Fix typo in tutorial in book (#412) 5 years ago
Andre Zanellato faad4c8c26 Sentence structure on notice 5 years ago
Andre Zanellato 88558eae6e Typos and sentence structure fixes 5 years ago
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