| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
| |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1605#note_2945202
|
| | |
|
| | |
|
| |
|
|
|
| |
This is an attempt to deal with the fact that `#[serde(flatten)]`
is weirdly broken and doesn't work with `serde_ignored`.
|
| |
|
|
|
| |
The previous phrasing was ambiguous and set us up for bugs, see
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1582#note_2942240
|
| | |
|
| | |
|
| |
|
|
|
| |
Nightly rustdoc now warns if you have a link that isn't necessary,
and if you have a link that might refer to two different things.
|
| | |
|
| |
|
|
| |
We'll use this in crates/arti in a moment.
|
| | |
|
| |
|
|
|
| |
`ItemOrBool` is currently not used anywhere (it was previously used by
the keymgr config).
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
add_warning: Tolerate clippy::missing_panics_doc
Closes #950
See merge request tpo/core/arti!1380
|