| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.
I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.
This commit makes cargo clippy fail. We will add exceptions in the next
commit.
|
| | |
|
| |
|
|
| |
Run maint/add_warning
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
```text
warning: duplicated attribute
--> crates/tor-hsservice/src/timeout_track.rs:630:14
|
630 | #![allow(clippy::needless_pass_by_value)] // TODO hoist into standard lint block
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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..)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
| |
* Bump in Cargo.toml
* Deal with `${Xmeta as ...}` incompatible change, by
always specifying an `as`, and changing `as tokens`.
|
| |
|
|
| |
Found by "git grep adhoc" and manual inspection.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
Retain the TODO for making this properly pub somewhere.
|
| |
|
|
|
| |
`cargo clippy --all-features --tests` is reporting warnings about
the unnecessary cloning.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
We have a profusion of similar methods with similar names and similar
documentation. Centralising the documentation in a trait is helpful.
This also means that callers can just naturally call `.update` rather
than needing to spell out `.update_abs` vs `.update_rel` etc.
|
| |
|
|
|
| |
Clarify this in the update functions, and in the general discussion.
We don't want zero timeouts.
|
| |
|
|
|
|
|
|
| |
Simply running `rustfmt` makes a mess.
This new formatting is less nice but repo policy requires that the
layout is a fixed point under rustfmt and this is the least bad fixed
point I found.
|
| | |
|
| | |
|
| |
|
|
| |
Suppresses some erroneous warnings.
|
| | |
|
| | |
|
| |
|
|
| |
I wish we could `use Duration::from_secs as secs`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The key point is this:
+//! I.e., the timeout tracker tells you when (in the future)
+//! any of the comparisons you have made, might produce different answers.
+//! So, that can be used to know how long to sleep for when waiting for timeout(s).
That's how the code in ipt_mgr.rs uses this. Without this change,
things go wrong in the following case: we've got at least one good
IPT, but not quite enough, and the others are taking too long. Ie,
the timeout for "we should publish" is in the past. We decide to
publish (correctly) but this *past* timeout should be disregarded.
Disregarding past timeouts is correct if the code which is making the
comparisons acts on the timeout when it occurs.
|
| | |
|
| | |
|
| |
|
|
| |
For the same reason as the allow(unreachable_pub).
|
| |
|
|
| |
cargo fmt, precisely.
|
| | |
|
| |
|
|
|
|
| |
It's not so straightforward to provide this (we'd need to poll the
FusedFuture and make a dummy a Context and so on), but this is just
used once in a test where we can replace it with use of `poll!`
|
| |
|
|
|
|
| |
This was named after the method from MockSleepRuntime. The name is
confusing because it seems to imply it might do something to the
monotonic time.
|
| | |
|
| |
|
|
|
| |
Fixes CI. There was a semantic conflict between !1535 (which added a
suppression) and !1523 (which added a new module).
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1523#note_2934299
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1523#note_2934298
|
| | |
|
| | |
|
|
|
This module is perhaps rather more comprehensive than needed right
now. But I found I kept wanting to change which bits of it I used.
|