| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
The macro needs to be defined before `ExplicitOrAuto`, otherwise we
can't reference it in its docs.
Fixes the broken doc links.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
We are about to need this in other crates (for generating the tests for
the `NotAutoValue` implementations).
|
| |
|
|
|
|
|
| |
This is a safeguard to prevent users from using ExplicitOrAuto with
types that serialize to the same value as ExplicitOrAuto::Auto.
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2146#note_3030692
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
This will be used for the `vanguard.mode` config option. The
`VanguardMode` corresponding to the `"auto"` variant will depend
on whether the `vanguards` feature is enabled: if the feature is
enabled, it is mapped to `VanguardMode::Lite`, and
`VanguardMode::Disabled` otherwise.
|
| | |
|
| |
|
|
| |
This commit is automatically generated.
|
| |
|
|
|
| |
(In most cases, by writing the documentation;
in tests, by permitting the documentation to be missing.)
|
| |
|
|
|
|
|
| |
The new (dubiously named) `Figment::extract_lossy` method
can treat decode numbers from strings, and booleans from numbers or
strings. This makes the behavior compatible with config-rs, and
should (I hope) finally allow us to migrate.
|
| |
|
|
|
| |
Figment can give an error under more conditions than just a parsing
failure, so we should report it a bit more vaguely.
|
| | |
|
| |
|
|
|
| |
There are probably ways to make this a bit more elegant, but at
least the tests still pass.
|
| |
|
|
| |
Found by "git grep adhoc" and manual inspection.
|
| |
|
|
|
|
|
| |
This is a new feature in d-d 0.10.0.
Our currrent semver policy doesn't care about this, but let's not
encode that property in the tree and leave ourselves a booby-trap.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |\
| |
| |
| |
| | |
Encapsulate usage of config-rs inside tor-config.
See merge request tpo/core/arti!2040
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
These are another case of exposing the config crate.
|
| | |
| |
| |
| | |
This will let us replace Config with something better.
|
| | | |
|
| | |
| |
| |
| |
| | |
This will let us test our configuration logic without having
to use the `config` crate directly.
|
| | |
| |
| |
| |
| | |
Our macros use these exports, but we don't need everybody else to
be able to see them.
|
| |/ |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Reviewing uses of `#[educe(default)]`, I came across these two places
where it was applied to a non-generic struct without any special
attributes on fields. std's derive will do just as well here.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Since Rust 1.66, std's default works properly for enums, provided that
the default variant is a unit.
Review all uses of `#[educe(default)]` on enums and replace them with
std where possible, which is most of them.
In 1.66 and later, std's `#[derive(Default)]` doesn't infer any
generic bounds on the derived impl, where it's an enum - since the
unit variant can always be constructed. So this change doesn't add
any generic bounds and is not API-visible.
|
| |
|
|
|
| |
Previously, within() would transform this error variant into
Invalid.
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
arti, tor-config: Allow listening on generic addresses for SOCKS and DNS.
See merge request tpo/core/arti!1613
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
| |
|
|
| |
At some earlier point of development this struct was pub.
|
| | |
|
| |
|
|
|
|
|
|
| |
This is a better trickery! Now we don't need to derive the list of
field names at all.
The test case becomes much simpler too, and no longer needs to compare
field lists since we have only the serde field list.
|
| |
|
|
|
| |
Add a performance note, and the manually-verified test case to support
it.
|
| |
|
|
|
|
|
|
|
| |
This involves returning the field list in the
`FlattenableTesterSuccess`.
This leaves the names a little off; we'll update those at the end.
Export this - it's going to replace the hidden pub test function.
|
| |
|
|
| |
We're going to use this some more, even.
|
| | |
|
| | |
|