| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
Run maint/add_warning
|
| | |
|
| | |
|
| |
|
|
| |
This feature has been removed from nightly, in favor of doc_cfg.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
```text
error: implicitly cloning a `String` by calling `to_string` on its dereferenced type
--> crates/tor-config/src/lib.rs:109:32
|
109 | V::String(_, s) => s.to_string(),
| ^^^^^^^^^^^^^ help: consider using: `s.clone()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone
note: the lint level is defined here
--> crates/tor-config/src/lib.rs:20:9
|
20 | #![deny(clippy::implicit_clone)]
| ^^^^^^^^^^^^^^^^^^^^^^
```
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
See #2060.
|
| |
|
|
|
|
| |
- Replaced `once_cell::sync::Lazy` with `std::sync::LazyLock`.
Signed-off-by: hashcatHitman <[email protected]>
|
| | |
|
| |
|
|
|
|
|
|
| |
Almost the only remaining use of this was for SocketAddr which we
should just import.
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2918#note_3185858
|
| |
|
|
|
| |
We're going to need this because of deficiencies in
metrics-exporter-prometheus.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
```text
warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator
--> crates/tor-config/src/load.rs:606:18
|
606 | .last()
| ^^^^^^ help: try: `next_back()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last
note: the lint level is defined here
--> crates/tor-config/src/lib.rs:9:9
|
9 | #![warn(clippy::all)]
| ^^^^^^^^^^^
= note: `#[warn(clippy::double_ended_iterator_last)]` implied by `#[warn(clippy::all)]`
```
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
This commit improves the documentation for
`ConfigurationSources::set_mistrust`, by explaining that this option is
unrelated to the paths defined within the configuration file itself,
referring to the `storage.permissions.dangerously_trust_everyone`
option.
|
| | |
|
| |
|
|
| |
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2696#note_3145971
|
| |
|
|
| |
Events of type `Any` now get discarded by the event handler.
|
| |
|
|
|
| |
This enables us to catch "rescan" events, regardless of their underlying
`EventKind`.
|
| |
|
|
|
|
|
|
| |
Without this, setting `watch_configuration = true` results in endless
config reloading due to arti accessing the config (which triggers an
access event, which in turn, triggers a config reload, and so on).
Closes #1794
|
| |
|
|
|
|
| |
Denies 'mod.rs' files for consistency.
https://rust-lang.github.io/rust-clippy/master/index.html#mod_module_files
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
| |
We'll use this to implement defaults for maps in our configuration.
|
| | |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Also updated other packages to get `CfgPath` directly from
`tor-config-path' instead of 'tor-config'.
|
| |
|
|
| |
This is a direct move of the `path` module from tor-config.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
When testing, compare the contents of the files too, not just their
mtime Otherwise, because the polling backend detects changes based on
mtime, if the test creates/writes files too fast, it will fail to notice
changes (this can happen, for example, on a tmpfs).
|
| |
|
|
|
|
|
|
|
| |
The default is 30s, which feels a bit too long.
Also, when testing, we use a much shorter interval.
This is meant to be a temporary solution, so we hard-code the interval
rather than make it configurable.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
inotify.
On windows and platforms that support inotify (i.e. linux and android),
we continue using the recommended watcher. On platforms that use kqueue,
we switch to a polling watcher to work around a [notify bug] that
manifests when using a non-recursive watcher to watch a directory.
This commit is best reviewed with `git diff --ignore-all-space`.
Closes #1644
[notify bug]: https://github.com/notify-rs/notify/issues/644
|
| | |
|
| |
|
|
|
| |
This type will soon become platform-dependent, so I am preemptively
adding a type alias.
|
| |
|
|
|
|
| |
This moves the `assert_config_error` helper from the restricted
discovery config tests to a `testing` module in `tor-config` (I am about
to reuse it for the C Tor keystore config tests too).
|
| | |
|
| | |
|