2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-01-16 02:39:55 +00:00
Commit graph

125 commits

Author SHA1 Message Date
Kian-Meng Ang
fc69db1703 Fix typos 2022-06-30 20:46:04 +08:00
Josh Triplett
4534db57eb
Merge pull request #1024 from joshtriplett/remove-pre-std-future-docs
futures now re-exports std Future; remove docs about differences
2022-06-03 15:14:29 -07:00
Josh Triplett
ca8305064b Switch branch name to main
Update all references.
2022-06-02 11:17:20 -07:00
Josh Triplett
6f2b6d3340 futures now re-exports std Future; remove docs about differences 2022-06-02 10:25:33 -07:00
kokihonda
dd2749ca35 Remove the numbering of the remaining previous chapters 2021-09-21 10:26:16 +09:00
surechen
9c031375c8
docs: add description for fuse() in handling_disconnection
Ref #88
2021-08-24 13:38:21 +02:00
Max Davitt
a410082a7f
Fix typo in Tasks book page 2021-05-28 12:59:41 -04:00
Micaël Bergeron
7eaf577b78
Fix a typo for [sic] FuturesExt trait
The trait that is being referred to here is called `futures::future::FutureExt`.
2021-01-06 12:47:26 -05:00
Akshat Agarwal
efaeadce88
(typo) s/panicing/panicking 2020-09-09 09:35:00 +05:30
Ryan Brainard
50e7cf0e43 Pass in error to log line with placeholder 2020-08-02 17:49:56 +09:00
Ryan Brainard
c5631996c9 Match on result (input) not stream (output) 2020-08-02 17:49:19 +09:00
abhi
4742f461fe
Add missing ? operator after handle.await
According to line#118, there should be a `?` operator after `await`.
2020-02-22 15:17:06 +05:30
ninj
b258215952
fix syntax problem for task::sleep 2020-01-25 22:13:26 +00:00
Florian Gilcher
1ababac97f
Merge branch 'accept_loop_pattern' 2020-01-22 12:47:41 +01:00
Florian Gilcher
f9fe5c90cf
Fix some typos in accept-loop pattern chapter 2020-01-22 12:47:18 +01:00
Florian Gilcher
cad2880eb8
Merge pull request #550 from sclaire-1/master
Edit tutorial: implementing_a_client.md
2020-01-21 15:44:44 +01:00
Paul Colomiets
0029037883 async-listen crate: Add error_hint() invocation 2020-01-13 08:46:32 +02:00
Paul Colomiets
c8c075615c book: Add Production-ready Accept Loop section
Part of the #658 work
2020-01-12 03:47:37 +02:00
svengrim
447c17128f
fix: Fix typo in documentation 2019-12-10 14:37:32 +01:00
linkmauve
55560ea9b4
docs: Replace mention of futures-preview crate
It is now stable in 0.3.
2019-11-27 19:35:27 +01:00
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().
2019-11-21 18:03:10 +01:00
sclaire-1
b2aaa8b825
Edit tutorial: implementing_a_client.md
Edited to improve reading flow
2019-11-16 13:02:17 -08:00
yjhmelody
76ec9c4563 update doc url 2019-11-15 14:33:34 +08:00
sclaire-1
8473b738d0
Edit tutorial index.md
Edited the structure of sentences to make it easier to read
2019-11-13 16:33:44 -08:00
Florian Gilcher
6f4bea07a1
Update version requirements in the tutorial 2019-11-13 15:33:52 +01:00
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.
2019-11-11 21:14:55 +01:00
Yoshua Wuyts
4aa9928ece
v1.0.0
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
2019-11-11 16:13:22 +01:00
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
2019-11-06 20:20:27 +00:00
Sheyne Anderson
1a51ca424a Fix typo in tutorial in book (#412) 2019-11-01 20:17:46 +01:00
Andre Zanellato
faad4c8c26 Sentence structure on notice 2019-10-21 19:50:57 -03:00
Andre Zanellato
88558eae6e Typos and sentence structure fixes 2019-10-21 19:47:14 -03: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
Stjepan Glavina
f2ca3f37a9 Fix build errors in docs 2019-09-22 11:47:39 +02:00
Stjepan Glavina
a97d26ca13 Fix imports in the book 2019-09-21 15:22:50 +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
Yuki Okushi
532c73cf77 Fix typo in stability-guarantees.md (#136) 2019-08-31 16:15:26 +02:00
Florian Gilcher
366546b9ce
Visibly import in tasks example
Fixes #97
2019-08-26 14:39:25 -07: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