| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
| |
Change the waker to have a weak reference to the executor.
Detected by miri.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
It turns out that these types are generally useful, and that they
are in fact needed for tor-rtmock to compile without a PreferredRuntime.
|
| |
|
|
| |
(The trait no longer has any async methods.)
|
| | |
|
| |
|
|
|
|
| |
Stop referring to TCP streams in its documentation;
update other documentation to refer to NetStreamProvider
rather than TcpProvider.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having this in the `tor-async-utils` crate prevents us from doing both
of the following without introducing a circular dependency:
* using it in `tor-rtmock` (which we currently do, particularly in
tests).
* using `tor-rtmock` to test things in `tor-async-utils`. We don't do
this yet, but it is generally sensible to do so. In particular we
want to move the `stream_peak` module there, which is currently tested
with `tor-rtmock`.
Moving this into its own crate avoids this circular dependency.
|
| |
|
|
|
| |
std::backtrace::Backtrace's Display looks the same as
backtrace_rs::Backtrace's Debug
|
| |
|
|
|
| |
Removes resolve_backtraces from rtmock since it is no longer needed as
stdlib's backtraces automatically lazily resolve without needing a &mut.
|
| | |
|
| |
|
|
| |
Improve/replace some out-of-date notes in the docs.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add a function to get the keying material as detailed by RFC 5705.
Because native-tls doesn't have such support, there is a place holder
panic!() for now.
This means that for the forseable future, relay would only work with
rustls until we figure out a solution for native-tls.
Closes #1432
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
* Change `pub` to `export`
* Change the `=` in define to `:`
* Change `pub_template_semver_check` to `template_export_semver_check`
Right now, 0.12.1 supports both syntaxes. I have verified this branch
also compiles with
https://gitlab.torproject.org/Diziet/rust-derive-deftly/-/merge_requests/402
ee171ffaf56d7dcb7d75584054921153fe19b222
|
| |
|
|
| |
This commit is automatically generated.
|
| | |
|
| |
|
|
| |
derive-deftly 0.10.x rejects unrecognised `#[deftly]` attributes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the combination of a number of separate commits, many of which
were generated by seddery, and then rebased and squashed.
Cargo.toml
perl -i~ -pe 's{^derive-adhoc}{derive-deftly = "0.10"}' crates/*/Cargo.toml
(not regenerated during rebase)
update Cargo.lock
`cargo fetch` without --locked
(regenerated during rebase)
seddery
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{^use derive_adhoc}{use derive_deftly}'
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bdefine_derive_adhoc\b}{define_derive_deftly}g'
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bAdhoc\b}{Deftly}g if m{derive}'
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\#\[derive_adhoc\b}{#[derive_deftly}g'
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{use derive_adhoc}{use derive_deftly}'
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc\b}{derive_deftly_adhoc} if m{use.*deftly}'
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc!}{derive_deftly_adhoc!}'
(not regenerated during rebase)
Manually add `#[derive_deftly_adhoc]` where needed.
seddery
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\#\[adhoc\b}{#[deftly}g'
git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc_template}{derive_deftly_template}'
(not regenerated during rebase)
Manually fix up an import
Manually update some builder attrs
Manually fix up tor_rtmock::time_core
This was missed in my seddery, due to me rebasing the branch and not
redoing the seddery.
|
| |
|
|
|
| |
This was incorrect usage, as pointed out in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2052#note_3012727
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
It bothered me that when I added a `MockCoarseTimeProvider` to the
mock time providers, I had to manually grep to check that there
weren't places the time was updated where I ought to also update the
coarse time.
Prove that the code is right by hiding all the times together in a
struct that prevents un-synchronised updates.
This is part 1, where we move the fields from simple_time::State to
the new struct.
|
| | |
|
| |
|
|
|
|
| |
We're going to put more in here.
(Yes, I know we just invented this...)
|
| |
|
|
|
| |
Modules with the same name as external crates don't work well with our
MSRV.
|
| | |
|
| |
|
|
| |
We must also impl CoarseTimeProvider for mocked runtimes.
|
| | |
|
| |
|
|
| |
This reduces duplication a little.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This makes it synchronous. The trait bounds on the return type
have also been relaxed to not require Clone
|
| |
|
|
|
|
|
| |
This helps abstract away the need to create a oneshot channel in order
to get the return value out of an async function when using MockRuntime.
ref: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1727#note_2965352
|
| | |
|
| |
|
|
|
| |
Always reify a default SimpleMockTimeProvider, and then apply the
starting_wallclock to it. This will make the next change fit.
|
| |
|
|
|
|
|
|
| |
Without this, it can be a bit confusing since you just get the
output (if any) of all the test runs, concatenated. It seems sensible
to put the framing centrally.
And, this would be helpful if the test fails for any reason.
|
| | |
|
| |
|
|
| |
cargo fmt, precisely.
|
| | |
|
| |
|
|
| |
This was a slip.
|