| 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.
|
| |
|
|
|
|
|
|
| |
Some of the tests used derive(Builder), which is not current
practice for our configuration.
Additionally, they didn't implement the requisite ConfigBuilder
logic to pass with the other changes in this branch.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This new method modifies a builder by replacing any unset values
that have a default with that default. We're using this method
so that we can re-serialize a builder into a `ConfigurationTree`
with all of its default values included.
In all cases, `b.apply_defaults()?; b.build()` should produce
the same output as `b.build()`.
The interesting parts of this commit are in tor_config::load
and tor_config::derive. The rest of this commit just adds
`apply_defaults` to other builders that _aren't_ made with
`derive_deftly(TorConfig)`.
|
| |
|
|
| |
This isn't strictly necessary, but it helps for consistency.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
derive_deftly wants to expand types before passing them to
macro_rules macros, which is quite reasonable. But map_builder
wants its input collection type to be an `ident`, not a `path`.
(And macro_rules doesn't accept `path` before a `<`.)
To fix this, we're providing an alternative syntax for map_builder,
where the inputs are the map type and the builder map type.
|
| |
|
|
| |
Run maint/add_warning
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This is a little tricky (beyond the usual macro fun) because we
needed to use ExtendBuilder to get reasonable behavior for our
default trees.
|
|
|
We're about to need this to define some of the configuration
for RPC listeners.
The provided map-builder type is much less voluminous in terms of
APIs added than the list-builder type: It just uses Deref* and sub_builder.
I think this simplicity may be a win.
I'll need to rethink how this type handles defaults in order to
implement connect points properly; I've left XXXXs for that issue.
|