| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
Now that we can admit to knowing about tor-cert-x509, we can use
TlsCertAndKeys to simplify everything.
|
| |
|
|
|
|
|
| |
Now that tor-cert-x509 is its own crate, we can use that,
and avoid the circular dependency.
Closes #2330.
|
| |
|
|
|
|
| |
It would introduce a circular dev-dependency, which is not
well-supported by cargo publish. I hope to resolve this and
re-enable the test in #2330.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Closes #2316.
|
| |
|
|
|
| |
These are as yet unimplemented; there's a stub type
for the providers (nativetls) that won't actually have them.
|
| |
|
|
| |
This adds the lint to all our crates.
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
| |
This new trait is compatible with tokio-console.
|
| |
|
|
| |
This feature has been removed from nightly, in favor of doc_cfg.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, run
```
git grep -l "^edition =" |
xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;'
```
Second, manually verify that all Cargo.toml files have changed,
and nothing else has changed.
Third, run cargo fmt again.
|
| |
|
|
| |
See #2060.
|
| | |
|
| |
|
|
| |
rustfmt.
|
| |
|
|
|
|
|
|
| |
Introduce ToplevelRuntime as an alias, and use it in the top-level
programs.
Now none of the principal protocol implementation code has access to
the executor's toplevel entrypoint, and can't call it by mistake.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Forbid re-entering the executor using ToplevelBlockOn::block_on.
This was always forbidden in the case of MockExecutor, but that meant
that tests using MockExecutor would malfunction if the code under test
needed to re-enter the executor from sync code (since the code under test
would have to use block_on, which wrong). See #1835.
Provide a function which *can* do this, reenter_block_on. The
MockExecutor needs to know the difference, and other runtimes may too.
They are conceptually quite different operations.
Introduce ToplevelRuntime as a convenience alias.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Document the new plan for blocking interaction in the trait-level
docs for the Blocking trait (used to be SpawnBlocking).
Add cross-references (in some cases to not-yet-existing pieces).
* Rename: spawn_blocking to spawn_thread. We're going to distinguish
thread-creation (relatively expensive) from brief entry to sync code
(relatively cheap, but more restricted).
* Rename the SpawnBlocking trait to Blocking, and its ThreadHandle
to ThreadHandle. This trait is going to gain more functionality.
* Add the missing mention of `Blocking` to the docs for `Runtime`.
|
| |
|
|
|
|
|
|
|
|
| |
We're going to distinguish top-level runtime entry, from *re*-entry to
an existing executor. It is most convenient to rename this trait
first. Documentation of the distinction will come later.
(We're going to retain the function name `block_on`, but we want the trait
to be more obviously a top-level only thing, though, so we give it a
name that will hopefully avoid it peroulating throughout the codebase..)
|
| | |
|
| |
|
|
|
| |
This renames UnsupportedStreamOpsHandle to NoOpStreamOpsHandle for
clarity (the old name kind of sounded like the name of an error type).
|
| | |
|
| |
|
|
|
| |
This adds a new SpawnBlocking trait, which exposes the spawn_blocking
function that tokio, async-std, and other runtimes have.
|
| |
|
|
|
|
| |
Denies 'mod.rs' files for consistency.
https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
|
| | |
|
| |
|
|
|
|
|
|
| |
This trait will provide additional operations on `Stream`s.
For now, the only supported operation is `set_tcp_notsent_lowat`
(needed for #1728).
Part of #1769
|
| |
|
|
|
|
|
|
| |
In 1.83, this warning triggers on many of our crates.
We're thinking of fixing them all, but for now,
we're going to disable the warning.
This is part of #1765.
|
| |\
| |
| |
| |
| | |
Provide a type-erased SleepProvider + CoarseTimeProvider and use it for memquota queues
See merge request tpo/core/arti!2460
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This will replace the internal ad-hoc DynCoarseTimeProvider in
tor-memquota.
We need this to be public because it's going to be shared by many of our
protocol elements (eg ClientCirc, Channel, etc.) as they need to use
it for their mq queues.
|
| | |
| |
| |
| |
| |
| | |
I'm about to add some unsafe which I want tested in CI.
We must disable two tests.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes
cargo check --all-features -p tor-async-utils --all-targets
which otherwise prints
warning: function `new_unnamed_socketaddr` is never used
--> crates/tor-rtcompat/src/unix.rs:14:15
|
14 | pub(crate) fn new_unnamed_socketaddr() -> std::io::Result<SocketAddr> {
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
| | |
|
| |
|
|
|
| |
It turns out that these types are generally useful, and that they
are in fact needed for tor-rtmock to compile without a PreferredRuntime.
|
| | |
|
| |
|
|
|
| |
This is feature-complete, but will need tests.
I'm holding off at this point so we can discuss naming on these types.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(And similarly rename TcpListener to NetStreamListener,
along with their TcpStream/TcpListener associated types.)
These types are about to become generic over addresses,
and therefore shouldn't be named after TCP.
Renaming was done mostly with Rust Analyzer,
except for some macros that needed to be hand-edited.
(I'll revise the comments in the next commit;
this one is all about renaming.)
|
| |
|
|
|
|
|
|
|
|
| |
It's redundant with the incoming() method (which turns the
TcpListener into a Stream of connections), and nothing actually used
it outside of tests.
Removing this method allows us to simplify our TcpListener code a
good deal, as can be seen by some of the implementations we removed
from our example and testing code.
|
| | |
|
| |
|
|
|
|
|
| |
With this extension trait, we no longer need to construct
`CompoundRuntime` directly outside of tor-rtcompat. This in turn
will make it a little less painful when we have to add more generics
to CompoundRuntime.
|
| |
|
|
| |
New tests should usually use tor_rtmock::MockRuntime.
|
| |
|
|
| |
This commit is automatically generated.
|
| |
|
|
|
| |
Modules with the same name as external crates don't work well with our
MSRV.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Explanation at
https://rust-lang.github.io/rust-clippy/master/index.html#/useless_vec
This is the non-tests subset of the same-named commmit in !1388,
(recreated by hand by me, and then checked against that commit;
I stole the commit message from Nick's.)
This should be uncontroversial I think.
|