aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-config/src/mut_cfg.rs
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | 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.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* test lint blocks: Add many many automaticallyIan Jackson2022-12-121-0/+9
| | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* Replace manual Default impl with std derive in tor-configIan Jackson2022-03-021-7/+1
|
* Add a few tests to tor-config.Nick Mathewson2021-12-071-0/+45
|
* Oops: MutCfg shouldn't implement Clone.Nick Mathewson2021-12-071-8/+0
| | | | | | | | We don't want MutCfg to be automatially coneable, or we'll wind up with surprises like the one that this patch fixes in TorClient. (The "surprise" is that reconfigure() would only apply its client-specific options to one client instance.)
* MutCfg: Add map_and_replace.Nick Mathewson2021-12-071-0/+10
| | | | | This will help in the case when a configuration can only partially change.
* MutCfg facility to help with reconfiguration.Nick Mathewson2021-12-071-0/+66
It's useful to keep configuration objects inside a RwLock<Arc<>>, so we can have slightly-stale pointers to the existing configuration structure without holding locks too long. This code adds a MutCfg type with basic support for this pattern, and functions to make it a bit more ergonomic.