John Vandenberg
c8b9a48402
More clipy fixes
2025-01-23 09:39:09 +08:00
John Vandenberg
b3a3c5ce28
Apply clippy fixes
2025-01-23 09:36:01 +08:00
John Vandenberg
6fd127808d
chore: Fix rustdoc lints
2024-09-08 10:04:38 +08:00
Marc-Antoine Perennou
57eafb41d0
silence warnings reported by newer rust versions
2024-08-21 10:13:50 +02:00
Marc-Antoine Perennou
79c89d779d
deps: update gloo-timers to 0.3
2024-08-21 10:04:51 +02:00
Dan Gohman
590386a388
Fix compilation errors with feature = io_safety
.
...
Fix a typo of "io-safety" in place of "io_safety", and fix various
compilation errors exposed by this fix.
2024-08-20 17:40:24 -07:00
John Vandenberg
0633c94c7b
Fix typos
2024-08-20 08:03:49 +08:00
Marc-Antoine Perennou
bbde18ffbd
fix CI for recent rustc
...
Allow for unused `pub use` in experimental API which doesn't have its mods public for noiw.
MIPS CI is fully broken (doesn't find the MIPS toolchain) so disable it for now.
Reenable powerpc64 which is no longer broken
2023-11-23 15:01:15 +01:00
John Nunley
c17710366b
Update src/fs/file.rs
...
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
2023-05-01 07:05:30 -07:00
jtnunley
dc7bb8e97d
Fix minor issues
2023-04-30 10:00:35 -07:00
jtnunley
27f26ea430
iline docs
2023-04-30 09:58:28 -07:00
jtnunley
c63c43341a
add end-of-file newline
2023-04-30 09:58:28 -07:00
jtnunley
e1d66f53a2
code review
2023-04-30 09:58:28 -07:00
jtnunley
7c408f11dc
add I/O safe traits
2023-04-30 09:58:28 -07:00
Josh Triplett
1855e858e6
Merge pull request #1044 from notgull/timeout_roundup
...
Round up timeout to the nearest millisecond for WASM
2023-05-01 00:53:53 +09:00
Martin Nordholts
d22585d7de
Prevent races between dropping File LockGuard and waking its tasks
...
By changing the inner `LockGuard` value to an `Option` and setting it to
`None` in `drop()` so we can drop the `Arc` _before_ waking its tasks.
2023-04-07 06:05:48 +02:00
jtnunley
fbf1ef6e72
Round up ms timeout
2022-11-25 14:14:31 -08:00
Josh Triplett
798ce31e10
Merge pull request #1031 from kianmeng/fix-typos
...
Fix typos
2022-07-13 09:50:02 -07:00
Josh Triplett
c6b2128ccd
Merge pull request #1030 from joshtriplett/file-eof-should-not-be-permanent
...
Fix file EOF to not be permanent: reading again should give new data
2022-07-01 15:29:27 -07:00
Kian-Meng Ang
fc69db1703
Fix typos
2022-06-30 20:46:04 +08:00
Josh Triplett
dfdf56cc9a
Test that file EOF is not permanent: reading again should give new data
2022-06-30 02:02:28 -07:00
Josh Triplett
64b7791ee5
When read returns EOF, ensure future reads still check the file for EOF
...
Go back to the idle mode when returning EOF, so that the next read will
make another attempt to read from the file in case the file grew.
2022-06-30 02:02:28 -07:00
Yosh
21b72eb20d
Merge pull request #894 from jbr/dont-poll-after-eof-in-io-copy
...
io::copy: don't poll the reader again after eof while waiting for the writer to flush
2022-06-21 12:16:59 +02:00
Josh Triplett
996ff48f6d
Merge pull request #1029 from joshtriplett/seek-ext
...
Export `BufReadExt` and `SeekExt` from `async_std::io`
2022-06-20 16:14:04 -07:00
Josh Triplett
955fa65a64
Fix whitespace errors in a test
2022-06-20 03:53:33 -07:00
Josh Triplett
ba24561146
Export BufReadExt
and SeekExt
from async_std::io
...
`async_std::io` exports `Read`, `ReadExt`, `Write`, `WriteExt`,
`BufRead`, and `Seek`. But it does not export `BufReadExt` and
`SeekExt`; those only appear in `async_std::io::prelude`.
Export both `BufReadExt` and `SeekExt` from `async_std::io`. This makes
it easier for code not using the prelude to import all of the I/O traits
it uses from the same module.
2022-06-20 01:03:57 -07:00
Jacob Rothstein
ae817ca1a2
don't poll the reader again after eof while waiting for the writer to flush
2022-06-02 15:32:40 -07:00
Josh Triplett
ca8305064b
Switch branch name to main
...
Update all references.
2022-06-02 11:17:20 -07:00
Josh Triplett
c56b6a1c30
Merge pull request #1017 from joshtriplett/stabilize-spawn-blocking
...
Stabilize `std::task::spawn_blocking`
2022-06-02 08:53:36 -07:00
Josh Triplett
abbf944371
Fix CI errors about unused-macro-rules
...
float_product and float_sum had unused rules, because they weren't
successfully using their second branch, and weren't successfully
defining wrapping types.
That then led to the discovery that those types *can't* be defined,
because std doesn't actually define any operations on `Wrapping<f32>` or
`Wrapping<f64>`. So, drop those portions of the float macros.
Fix that, and in the process, unify the integer and float macros.
2022-06-01 20:56:08 -07:00
Josh Triplett
07ba24cd87
Stabilize std::task::spawn_blocking
...
Given how widely used spawn_blocking is within async-std itself, and how
useful it is for building other APIs, I think it makes sense to offer it
just as we do `spawn`, even though it isn't standard in Rust itself.
2022-06-01 15:58:43 -07:00
Jeremiah Senkpiel
264a7125e1
Merge pull request #1013 from cuishuang/master
...
fix some typos
2022-05-10 12:06:49 -07:00
Josh Triplett
1356551ba6
Add TryFrom
impls to convert async types to corresponding sync types
...
Add `TryFrom` implementations to convert `TcpListener`, `TcpStream`,
`UdpSocket`, `UnixDatagram`, `UnixListener`, and `UnixStream` to their
synchronous equivalents, including putting them back into blocking mode.
2022-04-27 01:57:11 -07:00
cuishuang
ab112d5db6
fix some typos
...
Signed-off-by: cuishuang <imcusg@gmail.com>
2022-04-27 14:18:31 +08:00
Josh Triplett
f6ecd5ff33
Remove unused num_cpus dependency (handled by async_global_executor)
...
async-std doesn't use num_cpus directly, only via async_global_executor.
2022-04-23 11:43:43 -07:00
Yosh
f201f4a7bf
Merge pull request #994 from jaztec/master
...
Match error message from sync File::create in async File::create
2022-03-22 18:49:16 +01:00
Nicholas Nethercote
cca0f3e321
Use the default recursion_limit
.
...
Now that `extension_trait!` is gone, an increased limit isn't necessary.
2022-03-15 09:53:28 +11:00
Nicholas Nethercote
01ede03e0a
Reindent de-macrofied code.
...
This commit only affects whitespace; `git diff -w` for it is empty.
2022-03-11 13:16:30 +11:00
Nicholas Nethercote
1146c66f1b
Remove extension_trait
.
...
At this point, `extension_trait` is basically an expensive no-op. This
commit removes it. The next commit will adjust the indentation.
2022-03-11 13:14:40 +11:00
Nicholas Nethercote
2dde8820fa
Remove what's left of the first trait in extension_trait
.
2022-03-11 13:14:03 +11:00
Nicholas Nethercote
1c70420c5a
Move the base trait re-export outside of extension_trait
.
2022-03-11 13:12:56 +11:00
Nicholas Nethercote
c626a69670
Move the blanket impl
outside of extension_trait
.
2022-03-11 13:12:08 +11:00
Nicholas Nethercote
6b3667d1a4
Remove unnecessary types in extension_trait
.
...
The remaining type requires the square brackets (for now) because a `ty`
cannot immediately precede a `$(tt)*`.
2022-03-11 13:10:28 +11:00
Nicholas Nethercote
c10d2d3a6f
Simplify the first trait in extension_trait
.
...
The body and doc comment are no longer used.
2022-03-11 13:09:30 +11:00
Nicholas Nethercote
ed2fcce557
Remove docs
-only features from extension_trait
.
...
This is the `@doc` rules, the shim trait impls, and the imports.
2022-03-11 12:46:59 +11:00
Nicholas Nethercote
f56a8d6935
Remove unused borrowed
module.
2022-03-11 10:09:01 +11:00
Nicholas Nethercote
e19ab626a1
Remove unused parameter from extension_trait!
rules.
...
Two of the rules have `(+ $lt:lifetime)?` that is not used on the RHS
and serves no useful purpose. This commit removes it.
2022-03-11 09:31:01 +11:00
Nicholas Nethercote
db7c1946c8
Move the extension_trait!
accumulator to the end of the rules.
...
That way, when the `-> impl Future` rules fail (which is most of the
time), the cost of reparsing the accumulated tokens is avoided.
2022-03-10 17:10:12 +11:00
Nicholas Nethercote
21fb4ac0fb
Remove two useless rules from extension_trait!
.
...
They never run because they are subsumed by the two rules immediately
above.
2022-03-10 17:09:33 +11:00
dasman
22e4bbdf73
Fix a typo in future/mod.rs
2022-02-25 05:47:21 -05:00