| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Run cargo fix --edition
2. Selectively revert the "if let"->"match" changes.
These changes are meant to protect us from the lifetime changes
for "if let" bindings in Rust 2024.
But we're not actually relying on the old lifetime rules
anywhere, and the match syntax here is quite ugly.
3. Automatically revert `$pat:expr_2021` to `$pat:expr`.
(We don't actually want to restrict the expression syntax
that our macros accept).
Done with
`git grep -l expr_2021 | xargs perl -i -pe 's/expr_2021/expr/g;'`
4. Run cargo fmt.
|
| |
|
|
| |
See #2060.
|
| |
|
|
|
| |
The backspace character leads to funny results, depending on tool
or terminal used to show content of the file.
|
| |
|
|
|
|
|
|
|
|
| |
- Replaced single quotes in [`hashx::rand`] documentation link to
[`hashx::rand::RngBuffer`] with backticks so it actually works.
- Added a missing backtick to the link to
[`tor_persist::state_dir::StateDirectory::instance_peek_storage`] in the
documentation of
[`tor_persist::state_dir::StateDirectory::with_instance_path_pieces`].
|
| | |
|
| |
|
|
|
|
| |
Denies 'mod.rs' files for consistency.
https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
This will enable us to store more than one `K_relaysign_ed` in the
keystore.
Closes #1692
|
| |
|
|
|
|
|
|
| |
The new `Iso8601TimeSlug` is useful for encoding a timestamp as a `Slug`
(i.e. in a filename).
This is needed, for example, for #1692, to encode a timestamp as key
denotator.
|
| | |
|
| |\
| |
| |
| |
| | |
Add some more miri tests
See merge request tpo/core/arti!2502
|
| | | |
|
| |/
|
|
|
|
|
| |
We are about to need this in `tor-keymgr`, where we're about to add a
config for C Tor service keystores (the C Tor keystore config will have
an associated `HsNickname` that specifies which of the arti hidden
services it's supposed to be used with).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes
cargo check -p tor-circmgr --all-features --all-targets
which otherwise prints
warning: variant `InstanceState` is never constructed
--> crates/tor-persist/src/err.rs:45:5
|
13 | pub(crate) enum Resource {
| -------- variant in this enum
...
45 | InstanceState {
| ^^^^^^^^^^^^^
|
= note: `Resource` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
= note: `#[warn(dead_code)]` on by default
warning: variants `Deleting` and `Enumerating` are never constructed
--> crates/tor-persist/src/err.rs:66:5
|
57 | pub(crate) enum Action {
| ------ variants in this enum
...
66 | Deleting,
| ^^^^^^^^
...
78 | Enumerating,
| ^^^^^^^^^^^
|
= note: `Action` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
warning: method `delete` is never used
--> crates/tor-persist/src/load_store.rs:83:19
|
35 | impl Target<'_> {
| --------------- method in this implementation
...
83 | pub(crate) fn delete(&self) -> Result<(), ErrorSource> {
| ^^^^^^
|
| |
|
|
|
|
| |
The `derive_more` crate broke backward compatibility with this version,
so this change involved quite a few manual fixups.
With luck, they'll keep compatibility for some while in the future.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`.
|
| | |
|
| |
|
|
| |
This commit is automatically generated.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
| |
Change Path::display to this new function, in call sites where it's
being used for a diagnostic.
|
| |\
| |
| |
| |
| |
| |
| | |
deny clippy::unchecked_duration_subtraction
Closes #1304
See merge request tpo/core/arti!2008
|
| | | |
|
| |/
|
|
|
|
|
|
|
| |
The test fails on Windows systems for two reasons:
- File separator \ is printed in error message instead of expected /
- Temporary files are located within home directory, which is anonymized
Test failure can be provoked on Linux as well by setting TMPDIR to point
to a directory within HOME.
|
| |
|
|
|
| |
Actually, we want to test handling of the string with whatever the
extension would be, if it changed.
|
| |
|
|
|
|
|
| |
And replace ".lock" with it.
Now the only place that the "lock" extension this is still present as
a literal is in a test.
|
| |
|
|
|
|
| |
And replace "lock" with it. This is the first half of not open-coding
this; the sites where the literal string is ".lock" are in the next
commit, to help avoid the slip of using the wrong constant.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Now ee consistently use "instance id" or "instance identity" (or,
where unambiguous, "id"), to mean the identity of an instance within a
kind, and "instance" to refer to the whole thing including the kind.
|
| | |
|
| | |
|
| |
|
|
| |
We're going to get more call sites.
|
| | |
|
| |
|
|
|
|
|
|
| |
Slug is the general type. Instance kinds are slugs too. We need a
word for the slug-within-an-instance which identifies a storage
location for StorageHandle, or a raw subdirectory. Let's use "key".
Change the terminology (and variable names) everywhere.
|
| | |
|
| |
|
|
|
|
| |
Add comments where it's done automatically.
(There will be tests of the claims I'm making, in a later commit.)
|