Commit Graph

114 Commits (master)

Author SHA1 Message Date
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
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